[nautilus] file-operations: Rename and change the return type of a function
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: Rename and change the return type of a function
- Date: Thu, 23 Feb 2017 10:52:36 +0000 (UTC)
commit 1182b2c3a3a84a256e0f32e8856cd9625dcc6420
Author: Kartikeya Sharma <09kartikeya gmail com>
Date: Sun Feb 19 13:53:40 2017 +0530
file-operations: Rename and change the return type of a function
The function format_time does not clearly tell anything about
the fact that it is supposed to return something. And also it's
return type is char *. So, to make it consistent it's return
type is changed to gchar *.
This patch renames format_time to get_formatted_time.
https://bugzilla.gnome.org/show_bug.cgi?id=775091
src/nautilus-file-operations.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index cd8ea0b..aeef4fb 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -269,11 +269,11 @@ static void empty_trash_task_done (GObject *source_object,
static char *query_fs_type (GFile *file,
GCancellable *cancellable);
-/* keep in time with format_time()
+/* keep in time with get_formatted_time ()
*
* This counts and outputs the number of “time units”
- * formatted and displayed by format_time().
- * For instance, if format_time outputs “3 hours, 4 minutes”
+ * formatted and displayed by get_formatted_time ().
+ * For instance, if get_formatted_time outputs “3 hours, 4 minutes”
* it yields 7.
*/
static int
@@ -313,12 +313,12 @@ seconds_count_format_time_units (int seconds)
return hours;
}
-static char *
-format_time (int seconds)
+static gchar *
+get_formatted_time (int seconds)
{
int minutes;
int hours;
- char *res;
+ gchar *res;
if (seconds < 0)
{
@@ -341,7 +341,7 @@ format_time (int seconds)
if (seconds < 60 * 60 * 4)
{
- char *h, *m;
+ gchar *h, *m;
minutes = (seconds - hours * 60 * 60) / 60;
@@ -1060,7 +1060,7 @@ custom_time_to_string (char *format,
int secs;
secs = va_arg (va, int);
- return format_time (secs);
+ return get_formatted_time (secs);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]