summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 19:30:54 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 19:38:38 +0100
commit6f01c7af972dbf4698c63b707b225469b9405e47 (patch)
tree9a48f43a43992da80dcdd6415941cc72c7f6878d /src/utils.c
parentce3f0ce76f59216ff82ecd79e180a5c59d3d60d0 (diff)
downloadcalcurse-6f01c7af972dbf4698c63b707b225469b9405e47.zip
Remove parentheses from return statements
No reason to use "return (x);" here. Refer to the GNU coding guidelines for details. Created using following semantic patch: @@ expression expr; @@ - return (expr); + return expr; Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/utils.c b/src/utils.c
index d4390cd..3c7f595 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -249,8 +249,8 @@ is_all_digit (char *string)
long
get_item_time (long date)
{
- return (long)(get_item_hour (date) * HOURINSEC +
- get_item_min (date) * MININSEC);
+ return (long)(get_item_hour(date) * HOURINSEC +
+ get_item_min(date) * MININSEC);
}
int
@@ -348,7 +348,7 @@ update_time_in_date (long date, unsigned hr, unsigned mn)
new_date = mktime (lt);
EXIT_IF (new_date == -1, _("error in mktime"));
- return (new_date);
+ return new_date;
}
/*
@@ -377,13 +377,13 @@ get_sec_date (struct date date)
date.yyyy = atoi (current_year);
}
long_date = date2sec (date, 0, 0);
- return (long_date);
+ return long_date;
}
long
min2sec (unsigned minutes)
{
- return (minutes * MININSEC);
+ return minutes * MININSEC;
}
/*
@@ -450,7 +450,7 @@ get_today (void)
day.yyyy = lt->tm_year + 1900;
current_day = date2sec (day, 0, 0);
- return (current_day);
+ return current_day;
}
/* Returns the current time in seconds. */
@@ -484,7 +484,7 @@ mystrtol (const char *str)
if (errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN))
EXIT (_("out of range"));
- return (lval);
+ return lval;
}
/* Print the given option value with appropriate color. */
@@ -541,11 +541,11 @@ new_tempfile (const char *prefix, int trailing_len)
FILE *file;
if (prefix == NULL)
- return (NULL);
+ return NULL;
prefix_len = strlen (prefix);
if (prefix_len + trailing_len >= BUFSIZ)
- return (NULL);
+ return NULL;
memcpy (fullname, prefix, prefix_len);
memset (fullname + prefix_len, 'X', trailing_len);
fullname[prefix_len + trailing_len] = '\0';