]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: fix ul_path_scanf() use
authorKarel Zak <kzak@redhat.com>
Fri, 18 Jun 2021 14:50:58 +0000 (16:50 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jul 2021 09:29:01 +0000 (11:29 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock.c

index e9102e33a7e84e7136a4aec6f7f1fc0c2f21b72b..3609814723f00ba305b6d417af6eeaf7ecd5d58d 100644 (file)
@@ -441,7 +441,7 @@ get_hardware_delay(const struct hwclock_control *ctl)
        pc = ul_new_path("/sys/class/rtc/%s", rtcname);
        if (!pc)
                goto unknown;
-       rc = ul_path_scanf(pc, "name", "%128[^\n ]", &name);
+       rc = ul_path_scanf(pc, "name", "%128[^\n ]", name);
        ul_unref_path(pc);
 
        if (rc != 1 || !*name)