diff options
author | Stephen J. Kiernan <stevek@FreeBSD.org> | 2016-09-22 06:24:40 +0000 |
---|---|---|
committer | Stephen J. Kiernan <stevek@FreeBSD.org> | 2016-09-22 06:24:40 +0000 |
commit | 5c6b397ff191ce6fbc32f3629d5bee5c12d14c82 (patch) | |
tree | ef350eab58ac16d056c016003c98100d716487e7 /sys/boot/efi/libefi/time.c | |
parent | bdaf6d6913e80fb7419f6300e9a406ac46bff4ae (diff) | |
download | src-5c6b397ff191ce6fbc32f3629d5bee5c12d14c82.tar.gz src-5c6b397ff191ce6fbc32f3629d5bee5c12d14c82.zip |
The getsecs() function is implemented in platform- and bootfw-specific
files and, in a number of these places, there were problems with how they
were declared.
Some used int return instead of time_t. On some architectures the bit
width of time_t did not naturally fit into an integer and could lead to
some unexpected behavior. (For example, 32-bit ARM builds uses a 64-bit
time_t.)
Make sure the function prototypes always specify void for the argument
list when they do not have any arguemnts, otherwise some compilers can
complain about the prototype.
Reported by: Kevin Zheng
Reviewed by: sjg
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7463
Notes
Notes:
svn path=/head/; revision=306159
Diffstat (limited to 'sys/boot/efi/libefi/time.c')
-rw-r--r-- | sys/boot/efi/libefi/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/efi/libefi/time.c b/sys/boot/efi/libefi/time.c index b73c8ccf2c90..99831e1cf1a8 100644 --- a/sys/boot/efi/libefi/time.c +++ b/sys/boot/efi/libefi/time.c @@ -228,7 +228,7 @@ time(time_t *tloc) } time_t -getsecs() +getsecs(void) { return time(0); } |