From a747894428ea38c4a908acacb610fc3de714e0c0 Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Fri, 3 May 2013 13:41:40 -0400 Subject: [PATCH] coverity: ftell returns a signed value The check for flen < 0 could never have been true since flen was declared to be size_t (unsigned). Declare flen to be long since that is what ftell returns. Signed-off-by: Dwight Engen Signed-off-by: Serge Hallyn --- src/lxc/lxccontainer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 73c347d46..04a920826 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1133,7 +1133,7 @@ static int update_name_and_paths(const char *path, struct lxc_container *oldc, const char *newname, const char *newpath) { FILE *f; - size_t flen; + long flen; char *contents; const char *p0, *p1, *p2, *end; const char *oldpath = oldc->get_config_path(oldc); -- 2.47.3