Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MB-6599: Some compilers give warnings about ifdefs in params

Change-Id: Ic4ec5000fb575dc2814ae46ee9013e76811e1e2a
Reviewed-on: http://review.couchbase.org/20730
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information...
commit 524945fe44e926af08b6e413ff4d60b2150347a5 1 parent c5a4e2e
@trondn trondn authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 extensions/loggers/file_logger.c
View
13 extensions/loggers/file_logger.c
@@ -233,16 +233,17 @@ static void logger_log(EXTENSION_LOG_LEVEL severity,
(unsigned int)now.tv_sec,
(unsigned int)now.tv_usec);
} else {
+ const char *tz;
+#ifdef HAVE_TM_ZONE
+ tz = tval.tm_zone;
+#else
+ tz = tzname[tval.tm_isdst ? 1 : 0];
+#endif
/* trim off ' YYYY\n' */
str[strlen(str) - 6] = '\0';
prefixlen = snprintf(buffer, avail, "%s.%06u %s",
str, (unsigned int)now.tv_usec,
-#ifdef HAVE_TM_ZONE
- tval.tm_zone
-#else
- tzname[tval.tm_isdst ? 1 : 0]
-#endif
- );
+ tz);
}
} else {
fprintf(stderr, "gettimeofday failed: %s\n", strerror(errno));
Please sign in to comment.
Something went wrong with that request. Please try again.