From 3f0e5eceb4877f6e4abaaac2356d02fcec3da0d2 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Mon, 21 Dec 2020 10:15:10 +0000
Subject: [PATCH] (util.c) fix Logically dead code
Statement cannot be NULL at this state
Found by Coverity
Coverity id #110817
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/util.c b/lib/util.c
index 9e83a9748..32eaa4ad1 100644
a
|
b
|
x_basename (const char *s) |
664 | 664 | { |
665 | 665 | /* avoid trailing PATH_SEP, if present */ |
666 | 666 | if (!IS_PATH_SEP (s[strlen (s) - 1])) |
667 | | return (path_sep != NULL) ? path_sep + 1 : s; |
| 667 | return path_sep + 1; |
668 | 668 | |
669 | 669 | while (--path_sep > s && !IS_PATH_SEP (*path_sep)) |
670 | 670 | ; |