From 1be5ba505823d2b412a34bfe6d508433bef2d5d3 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 16 Apr 2013 17:56:06 +0700 Subject: [PATCH] minors --- tcejdb/Makefile.in | 2 +- tcejdb/win32/platform.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tcejdb/Makefile.in b/tcejdb/Makefile.in index 191c52f..60cbe64 100644 --- a/tcejdb/Makefile.in +++ b/tcejdb/Makefile.in @@ -844,6 +844,6 @@ tokyocabinet_all.c : myconf.c tcutil.c md5.c tchdb.c tcbdb.c tcfdb.c tctdb.c tca tokyocabinet_all.o : myconf.h tcutil.h tchdb.h tcbdb.h tcfdb.h tctdb.h tcadb.h -platform.o : basedefs.h platform.c +platform.o : basedefs.h platform.c win32/platform.c # END OF FILE diff --git a/tcejdb/win32/platform.c b/tcejdb/win32/platform.c index d19e6c1..62a62f5 100644 --- a/tcejdb/win32/platform.c +++ b/tcejdb/win32/platform.c @@ -7,8 +7,8 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result) { pthread_mutex_lock(&mutex); struct tm *cas = gmtime(timep); pthread_mutex_unlock(&mutex); - if (result == NULL) { - return NULL; /* was:cas */ + if (result == NULL || cas == NULL) { + return NULL; } memcpy(result, cas, sizeof (struct tm)); return result; @@ -19,7 +19,7 @@ struct tm *localtime_r(const time_t *timep, struct tm *result) { pthread_mutex_lock(&mutex); struct tm *cas = localtime(timep); pthread_mutex_unlock(&mutex); - if (result == NULL) { + if (result == NULL || cas == NULL) { return NULL; } memcpy(result, cas, sizeof (struct tm)); -- 2.7.4