From: Serge Hallyn Date: Mon, 22 Apr 2013 20:46:26 +0000 (-0500) Subject: remove needless check for 'line' which cannot be NULl there X-Git-Tag: lxc-1.0.0.alpha1~1^2~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbb8a488aeacf8a226d49773fe13798a202a78e2;p=thirdparty%2Flxc.git remove needless check for 'line' which cannot be NULl there (found by coverity) Signed-off-by: Serge Hallyn --- 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 */