aboutsummaryrefslogtreecommitdiffstats
path: root/src/calendar.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/calendar.c
parentce3f0ce76f59216ff82ecd79e180a5c59d3d60d0 (diff)
downloadcalcurse-6f01c7af972dbf4698c63b707b225469b9405e47.tar.gz
calcurse-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/calendar.c')
-rw-r--r--src/calendar.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/calendar.c b/src/calendar.c
index 7d54d10..160630e 100644
--- a/src/calendar.c
+++ b/src/calendar.c
@@ -195,7 +195,7 @@ calendar_change_first_day_of_week (void)
unsigned
calendar_week_begins_on_monday (void)
{
- return (week_begins_on_monday);
+ return week_begins_on_monday;
}
/* Fill in the given variable with the current date. */
@@ -218,14 +218,14 @@ calendar_init_slctd_day (void)
struct date *
calendar_get_slctd_day (void)
{
- return (&slctd_day);
+ return &slctd_day;
}
/* Returned value represents the selected day in calendar (in seconds) */
long
calendar_get_slctd_day_sec (void)
{
- return (date2sec (slctd_day, 0, 0));
+ return date2sec (slctd_day, 0, 0);
}
static int
@@ -246,14 +246,14 @@ calendar_get_wday (struct date *date)
static unsigned
months_to_days (unsigned month)
{
- return ((month * 3057 - 3007) / 100);
+ return (month * 3057 - 3007) / 100;
}
static long
years_to_days (unsigned year)
{
- return (year * 365L + year / 4 - year / 100 + year / 400);
+ return year * 365L + year / 4 - year / 100 + year / 400;
}
static long
@@ -267,7 +267,7 @@ ymd_to_scalar (unsigned year, unsigned month, unsigned day)
year--;
scalar += years_to_days (year);
- return (scalar);
+ return scalar;
}
/*
@@ -284,11 +284,11 @@ date_change (struct tm *date, int delta_month, int delta_day)
t.tm_mday += delta_day;
if (mktime (&t) == -1)
- return (1);
+ return 1;
else
{
*date = t;
- return (0);
+ return 0;
}
}
@@ -815,7 +815,7 @@ calendar_end_of_year (void)
static double
dtor (double deg)
{
- return (deg * M_PI / 180);
+ return deg * M_PI / 180;
}
/*
@@ -867,7 +867,7 @@ potm (double days)
V = 0.6583 * sin (dtor (2 * (lprime - LambdaSol))); /* sec 65 #13 */
ldprime = lprime + V; /* sec 65 #14 */
D = ldprime - LambdaSol; /* sec 67 #2 */
- return (50.0 * (1 - cos (dtor (D)))); /* sec 67 #3 */
+ return 50.0 * (1 - cos (dtor (D))); /* sec 67 #3 */
}
/*
@@ -897,7 +897,7 @@ pom (time_t tmpt)
for (cnt = GMT->tm_year; cnt < EPOCH; ++cnt)
days -= ISLEAP (cnt + TM_YEAR_BASE) ? 366 : 365;
- return (potm (days));
+ return potm (days);
}
/*
@@ -925,5 +925,5 @@ calendar_get_pom (time_t date)
&& relative_pom < abs (pom_tomorrow - half))
phase = (pom_tomorrow > pom_today) ? FIRST_QUARTER : LAST_QUARTER;
- return (pom_pict[phase]);
+ return pom_pict[phase];
}