The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/403
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Fixes: Coverity 357808. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 133cba4786ab9f7ae68cda0251baa7a0af77116a Mon Sep 17 00:00:00 2001 From: Christian Brauner <christian.brau...@ubuntu.com> Date: Tue, 28 Apr 2020 13:24:00 +0200 Subject: [PATCH] sysfs_fuse: remove logically dead code Fixes: Coverity 357808. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com> --- src/sysfs_fuse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sysfs_fuse.c b/src/sysfs_fuse.c index 06073c4..d6f7876 100644 --- a/src/sysfs_fuse.c +++ b/src/sysfs_fuse.c @@ -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");
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel