git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c443d37
)
lib: Use struct initialization
author
Volker Lendecke
<vl@samba.org>
Tue, 21 May 2024 06:31:45 +0000
(08:31 +0200)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 22 May 2024 04:23:29 +0000
(
04:23
+0000)
Make sure everything is initialized
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/time.c
patch
|
blob
|
history
diff --git
a/lib/util/time.c
b/lib/util/time.c
index d2bf2454e317ea67044d578a2851db73d96b6b3b..7ed8fb00447c8252f252f98cfcf46030be34d123 100644
(file)
--- a/
lib/util/time.c
+++ b/
lib/util/time.c
@@
-102,9
+102,7
@@
time_t convert_timespec_to_time_t(struct timespec ts)
struct timespec convert_time_t_to_timespec(time_t t)
{
- struct timespec ts;
- ts.tv_sec = t;
- ts.tv_nsec = 0;
+ struct timespec ts = {.tv_sec = t};
return ts;
}