}
#endif
+#define TIMESTAMP_BUFFER_SIZE 26 /* including the null */
+#define TIMESTAMP_NEWLINE_POS 24 /* offset to the newline placed by ctime */
void
AssertionFailed(char *file, int line)
{
- char tdate[26];
+ char tdate[TIMESTAMP_BUFFER_SIZE];
time_t when;
time(&when);
- (void)afs_ctime(&when, tdate, 25);
- fprintf(stderr, "%s: Assertion failed! file %s, line %d.\n", tdate, file,
+ (void)afs_ctime(&when, tdate, sizeof(tdate));
+ tdate[TIMESTAMP_NEWLINE_POS] = ' ';
+ fprintf(stderr, "%sAssertion failed! file %s, line %d.\n", tdate, file,
line);
fflush(stderr);
#ifdef AFS_NT40_ENV