]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/bootspec: use isempty where appropriate
authorMike Yuan <me@yhndnzj.com>
Tue, 14 May 2024 07:49:21 +0000 (15:49 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 14 May 2024 10:19:19 +0000 (18:19 +0800)
src/shared/bootspec.c

index 188613fb9eacac53ccaf63fcf988225e661f3dad..5bf346465724564ff5e4ec860f53cd4cf5237e70 100644 (file)
@@ -787,7 +787,7 @@ static int find_cmdline_section(
 
         /* Quick test to check if there is actual content in the addon cmdline */
         t = delete_chars(word, NULL);
-        if (t[0] == 0)
+        if (isempty(t))
                 *ret_cmdline = NULL;
         else
                 *ret_cmdline = TAKE_PTR(cmdline);