The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/359

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) ===
Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 4f18a6020b1489499f0a38219126c835b45cb636 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@ubuntu.com>
Date: Fri, 6 Mar 2020 09:55:47 +0100
Subject: [PATCH] proc_{cpuview,loadavg}: fix signed/unsigned check

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
---
 src/proc_cpuview.c | 3 ++-
 src/proc_loadavg.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/proc_cpuview.c b/src/proc_cpuview.c
index 4fa6306..58cc4e4 100644
--- a/src/proc_cpuview.c
+++ b/src/proc_cpuview.c
@@ -515,7 +515,7 @@ int cpuview_proc_stat(const char *cg, const char *cpuset,
 {
        __do_free char *line = NULL;
        __do_free struct cpuacct_usage *diff = NULL;
-       size_t linelen = 0, total_len = 0, l;
+       size_t linelen = 0, total_len = 0;
        int curcpu = -1; /* cpu numbering starts at 0 */
        int physcpu, i;
        int max_cpus = max_cpu_count(cg), cpu_cnt = 0;
@@ -523,6 +523,7 @@ int cpuview_proc_stat(const char *cg, const char *cpuset,
                 softirq = 0, steal = 0, guest = 0, guest_nice = 0;
        uint64_t user_sum = 0, system_sum = 0, idle_sum = 0;
        uint64_t user_surplus = 0, system_surplus = 0;
+       ssize_t l;
        uint64_t total_sum, threshold;
        struct cg_proc_stat *stat_node;
        int nprocs = get_nprocs_conf();
diff --git a/src/proc_loadavg.c b/src/proc_loadavg.c
index c6b8ce1..e5fa6be 100644
--- a/src/proc_loadavg.c
+++ b/src/proc_loadavg.c
@@ -168,7 +168,7 @@ int proc_loadavg_read(char *buf, size_t size, off_t offset,
        struct fuse_context *fc = fuse_get_context();
        struct file_info *d = INTTYPE_TO_PTR(fi->fh);
        pid_t initpid;
-       size_t total_len = 0;
+       ssize_t total_len = 0;
        char *cache = d->buf;
        struct load_node *n;
        int hash;
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to