udev-test: don't mix alloca() and regular C stack allocation in one expression

This commit is contained in:
Lennart Poettering 2020-09-03 16:56:47 +02:00
parent 1e7a67ec22
commit 7d81d85a05
1 changed files with 2 additions and 1 deletions

View 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);