[gnome-commander] Variable rename and null check



commit 03e4d43ba0d9676d496757b5945572c8c0ca9cac
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Jul 11 14:36:32 2021 +0200

    Variable rename and null check

 src/utils.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/utils.cc b/src/utils.cc
index 51f0e8f5..67784aad 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -382,15 +382,16 @@ const gchar *size2string (guint64 size, GnomeCmdSizeDispMode size_disp_mode)
 }
 
 
-const gchar *time2string (GDateTime *gDateTime, const gchar *date_format)
+const gchar *time2string (GDateTime *gDateTime, const gchar *dateFormat)
 {
     // NOTE: date_format is passed in current locale format
 
     g_return_val_if_fail (gDateTime != nullptr, nullptr);
+    g_return_val_if_fail (dateFormat != nullptr, nullptr);
 
     static gchar buf[64];
 
-    auto dateString = g_date_time_format (gDateTime, date_format);
+    auto dateString = g_date_time_format (gDateTime, dateFormat);
 
     strncpy (buf, dateString, sizeof(buf)-1);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]