From b4b3872b8efa3f02ead0886b7f27d1b758859ba6 Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Sun, 13 Apr 2014 17:50:44 +0100 Subject: [PATCH] applied indent --- conf.c | 3 ++- fcron.c | 3 ++- global.h | 4 ++-- mem.c | 10 +++++----- mem.h | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/conf.c b/conf.c index fd6284b..00228f4 100644 --- a/conf.c +++ b/conf.c @@ -958,7 +958,8 @@ add_line_to_file(cl_t * cl, cf_t * cf, uid_t runas, char *runas_str, " overflowed (case2). now=%lu, cl_timefreq=%lu, cl_nextexe=%lu.", cl->cl_shell, now, cl->cl_timefreq, cl->cl_nextexe); error - ("Setting cl_nextexe to TIME_T_MAX=%ld to prevent an infinite loop.", TIME_T_MAX); + ("Setting cl_nextexe to TIME_T_MAX=%ld to prevent an infinite loop.", + TIME_T_MAX); cl->cl_nextexe = TIME_T_MAX; } } diff --git a/fcron.c b/fcron.c index c4e91e5..d2b69b7 100644 --- a/fcron.c +++ b/fcron.c @@ -381,7 +381,8 @@ parseopt(int argc, char *argv[]) case 'l': if ((first_sleep = strtol(optarg, NULL, 10)) < 0 || first_sleep >= TIME_T_MAX) - die("First sleep can only be set between 0 and %d.", TIME_T_MAX); + die("First sleep can only be set between 0 and %d.", + TIME_T_MAX); break; case 'm': diff --git a/global.h b/global.h index 76367d6..c2ab950 100644 --- a/global.h +++ b/global.h @@ -156,11 +156,11 @@ /* 2^33 = 8589934592, so LONG is 64bits at least */ #if (LONG_MAX > INT_MAX) && (LONG_MAX > 8589934592) /* defined as time_t of 1st Jan of year (SHRT_MAX-1900) at 00:00:00 */ -# define TIME_T_MAX 971859427200 +#define TIME_T_MAX 971859427200 #else /* struct tm's tm_year is of type int, and tm_year will always be smaller than * the equivalent time_t, so INT_MAX is always a safe max value for time_t. */ -# define TIME_T_MAX INT_MAX +#define TIME_T_MAX INT_MAX #endif /* macros */ diff --git a/mem.c b/mem.c index 59b001d..2ce0107 100644 --- a/mem.c +++ b/mem.c @@ -27,22 +27,22 @@ #if defined(__sun) /* Solaris 10 has no strndup() */ char * -strndup (const char *s, size_t n) +strndup(const char *s, size_t n) /* Written by Kaveh R. Ghazi */ { char *result; - size_t len = strlen (s); + size_t len = strlen(s); if (n < len) len = n; - result = (char *) malloc (len + 1); + result = (char *)malloc(len + 1); if (!result) return 0; - memcpy (result, s, len); + memcpy(result, s, len); result[len] = '\0'; - return(result); + return (result); } #endif diff --git a/mem.h b/mem.h index 5b98dc8..72b3c30 100644 --- a/mem.h +++ b/mem.h @@ -54,7 +54,7 @@ /* functions prototypes */ #if defined(__sun) -extern char *strndup (const char *s, size_t n); /* Solaris 10 has no strndup() */ +extern char *strndup(const char *s, size_t n); /* Solaris 10 has no strndup() */ #endif extern char *strdup2(const char *); extern char *strndup2(const char *, size_t n); -- 2.47.3