]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-test: don't mix alloca() and regular C stack allocation in one expression 16945/head
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2020 14:56:47 +0000 (16:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2020 15:01:17 +0000 (17:01 +0200)
src/test/test-udev.c

index c7d69e0774622c9c07135867177306db8daed61d..006fdb650fe9a42e1e111ff8ab9c8af2226283a4 100644 (file)
@@ -96,7 +96,8 @@ static int run(int argc, char *argv[]) {
 
         assert_se(udev_rules_load(&rules, RESOLVE_NAME_EARLY) == 0);
 
-        const char *syspath = strjoina("/sys", devpath);
+        const char *syspath;
+        syspath = strjoina("/sys", devpath);
         r = device_new_from_synthetic_event(&dev, syspath, action);
         if (r < 0)
                 return log_debug_errno(r, "Failed to open device '%s'", devpath);