-
Committer:
Lucas De Marchi
-
Author(s):
Dmitry Antipov
-
Date:
2023-05-31 05:36:43 UTC
-
Revision ID:
git-v1:9c262fdb1c798fd87d91e8c669acbec4d632024b
shared: avoid passing {NULL, 0} array to bsearch()
Fix the following warning reported by UBSan (as of gcc-13.1.1):
shared/hash.c:244:35: runtime error: null pointer passed as
argument 2, which is declared to never be null
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
[ reshuffle the code to use return-early style ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>