mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
util: Fix signed/unsigned integer comparison
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Apr 22 01:48:03 UTC 2020 on sn-devel-184
This commit is contained in:
parent
1ebec7056b
commit
b7fb6100b4
@ -189,7 +189,7 @@ static int debug_level_to_priority(int level)
|
|||||||
};
|
};
|
||||||
int priority;
|
int priority;
|
||||||
|
|
||||||
if( level >= ARRAY_SIZE(priority_map) || level < 0)
|
if (level < 0 || (size_t)level >= ARRAY_SIZE(priority_map))
|
||||||
priority = LOG_DEBUG;
|
priority = LOG_DEBUG;
|
||||||
else
|
else
|
||||||
priority = priority_map[level];
|
priority = priority_map[level];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user