string-util: imply NULL termination of strextend() argument list
The trailing NULL in the argument list is now implied (similar to what we already have in place in strjoin()).
This commit is contained in:
+3
-3
@@ -934,7 +934,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
/* Preserve the trailing slash */
|
||||
|
||||
if (flags & CHASE_TRAIL_SLASH)
|
||||
if (!strextend(&done, "/", NULL))
|
||||
if (!strextend(&done, "/"))
|
||||
return -ENOMEM;
|
||||
|
||||
break;
|
||||
@@ -1005,7 +1005,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
if (streq_ptr(done, "/"))
|
||||
*done = '\0';
|
||||
|
||||
if (!strextend(&done, first, todo, NULL))
|
||||
if (!strextend(&done, first, todo))
|
||||
return -ENOMEM;
|
||||
|
||||
exists = false;
|
||||
@@ -1098,7 +1098,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
if (streq(done, "/"))
|
||||
*done = '\0';
|
||||
|
||||
if (!strextend(&done, first, NULL))
|
||||
if (!strextend(&done, first))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user