" 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;
}
}
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':
/* 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 */
#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 <ghazi@caip.rutgers.edu> */
{
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
/* 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);