mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(x_basename): the NULL check is unnecessary...
...because the pointer can't be NULL. Found by Coverity. Coverity id #110817. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
a68f2d1202
commit
40b96b67dd
@ -663,7 +663,7 @@ x_basename (const char *s)
|
||||
{
|
||||
/* avoid trailing PATH_SEP, if present */
|
||||
if (!IS_PATH_SEP (s[strlen (s) - 1]))
|
||||
return (path_sep != NULL) ? path_sep + 1 : s;
|
||||
return path_sep + 1;
|
||||
|
||||
while (--path_sep > s && !IS_PATH_SEP (*path_sep))
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user