diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-02-10 20:15:58 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-02-10 20:15:58 +0100 |
commit | 74dec7c69ae961f98e0a91da9fc3f6214183467a (patch) | |
tree | 4ff7444d46a5519ba47352965cedc7ea14116251 /src | |
parent | 8b7ef9a86d712f0939d1170b5abfe9af13b1873e (diff) | |
download | blogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.tar.gz blogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.tar.bz2 blogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.zip |
blogc: sysinfo: added tests
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc/sysinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blogc/sysinfo.c b/src/blogc/sysinfo.c index 8d9a810..4ec1411 100644 --- a/src/blogc/sysinfo.c +++ b/src/blogc/sysinfo.c @@ -101,6 +101,8 @@ blogc_sysinfo_get_datetime(void) return NULL; struct tm *t = gmtime(&tmp); + if (t == NULL) + return NULL; char buf[1024]; if (0 == strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", t)) |