]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
sysfs_fuse: remove logically dead code
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 28 Apr 2020 11:24:00 +0000 (13:24 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 28 Apr 2020 11:24:00 +0000 (13:24 +0200)
Fixes: Coverity 357808.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/sysfs_fuse.c

index 06073c498e7dca293a02cdb479680232ae07a1aa..d6f78764711c5142af59c99ee9dddca3bf15dd02 100644 (file)
@@ -101,10 +101,8 @@ static int sys_devices_system_cpu_online_read(char *buf, size_t size,
                        total_len = snprintf(d->buf, d->buflen, "0-%d\n", max_cpus - 1);
                else
                        total_len = snprintf(d->buf, d->buflen, "0\n");
-       } else if (cpuset) {
-               total_len = snprintf(d->buf, d->buflen, "%s\n", cpuset);
        } else {
-               return read_file_fuse("/sys/devices/system/cpu/online", buf, size, d);
+               total_len = snprintf(d->buf, d->buflen, "%s\n", cpuset);
        }
        if (total_len < 0 || total_len >= d->buflen)
                return log_error(0, "Failed to write to cache");