Fix from NAKAJI Hiroyuki for a trailing '\n\ in asctime.
authorJeremy Allison <jra@samba.org>
Wed, 15 Mar 2000 18:00:30 +0000 (18:00 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 15 Mar 2000 18:00:30 +0000 (18:00 +0000)
Jeremy.

source/lib/time.c

index 5fd260e5c90c0ed03276708f483c6e7447b0a8a6..3ac5a2a0b51d0f8ce1d0d3bf215ecdeced485348 100644 (file)
@@ -495,6 +495,8 @@ char *http_timestring(time_t t)
   else
 #ifndef HAVE_STRFTIME
   fstrcpy(buf, asctime(tm));
+  if(buf[strlen(buf)-1] == '\n')
+    buf[strlen(buf)-1] = 0;
 #else /* !HAVE_STRFTIME */
   strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S %Z", tm);
 #endif /* !HAVE_STRFTIME */