summaryrefslogtreecommitdiff
path: root/LibC/time.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-09 10:09:46 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-09 10:09:46 +0100
commite9cdb6bb9bcc1417af1bc01f950d006ae8c98f22 (patch)
tree83cb4002e34eea07f8e587e8cf9970ecf40366b3 /LibC/time.cpp
parent47b7eeda44d69afe279fc0008e7c5e74f52fab49 (diff)
downloadserenity-e9cdb6bb9bcc1417af1bc01f950d006ae8c98f22.zip
Fix all current build warnings in LibC.
Diffstat (limited to 'LibC/time.cpp')
-rw-r--r--LibC/time.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/LibC/time.cpp b/LibC/time.cpp
index b1bee00557..eedac5422c 100644
--- a/LibC/time.cpp
+++ b/LibC/time.cpp
@@ -10,6 +10,8 @@ time_t time(time_t* tloc)
struct timezone tz;
if (gettimeofday(&tv, &tz) < 0)
return (time_t)-1;
+ if (tloc)
+ *tloc = tv.tv_sec;
return tv.tv_sec;
}