From bbb8a488aeacf8a226d49773fe13798a202a78e2 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Mon, 22 Apr 2013 15:46:26 -0500 Subject: [PATCH] remove needless check for 'line' which cannot be NULl there (found by coverity) Signed-off-by: Serge Hallyn --- src/lxc/attach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 5b3ee4fc1..a7e907475 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -358,7 +358,7 @@ char *lxc_attach_getpwshell(uid_t uid) continue; /* trim line on the right hand side */ - for (i = strlen(line); line && i > 0 && (line[i - 1] == '\n' || line[i - 1] == '\r'); --i) + for (i = strlen(line); i > 0 && (line[i - 1] == '\n' || line[i - 1] == '\r'); --i) line[i - 1] = '\0'; /* split into tokens: first user name */ -- 2.47.3