clang/'Dead store': do not assign fnamelen

Vim hasn't changed this line in buf_modname().
Assigning a value to fnamelen is useless
when evaluating strlen() is sufficient for the condition check.
This commit is contained in:
Jan Edmund Lazo
2021-04-01 21:22:57 -04:00
parent 484370f206
commit 6d34b0b702

View File

@@ -4280,7 +4280,7 @@ char *modname(const char *fname, const char *ext, bool prepend_dot)
if (fname == NULL || *fname == NUL) {
retval = xmalloc(MAXPATHL + extlen + 3); // +3 for PATHSEP, "_" (Win), NUL
if (os_dirname((char_u *)retval, MAXPATHL) == FAIL
|| (fnamelen = strlen(retval)) == 0) {
|| strlen(retval) == 0) {
xfree(retval);
return NULL;
}