diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2021-07-28 12:04:54 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2021-07-28 12:04:54 +0200 |
commit | 91a2475f102973ef999f7ee6eddc6b4b1631fc4f (patch) | |
tree | 223c987c4c4919e99aaaa1fcca2b5da4c3a3869b /listen/listen.c | |
parent | 2fa14d72470db4431dc23b927f855ded51ab527d (diff) |
Listen: Fix test for hours in proper value range.
This really was a hint to GCC to know the value range so it spit bogus
warnings so this is not a functional fix. And of course hours are
restricted to values of 0..23, not 0..59.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Fixes: 6553ae600526 ("listen: Fix overzealous GCC 7 compiler warnings.")
Diffstat (limited to 'listen/listen.c')
-rw-r--r-- | listen/listen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/listen/listen.c b/listen/listen.c index 6504ed5..29fa53f 100644 --- a/listen/listen.c +++ b/listen/listen.c @@ -61,7 +61,7 @@ static char * ts_format(unsigned int sec, unsigned int usec) * value range of all variables thus avoid bogus warnings. For any * halfway modern GCC the checks will be optimized away. */ - if (hours >= 60) + if (hours >= 24) unreachable(); if (minutes >= 60) unreachable(); |