Fix logic error.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 18 Jan 2007 16:33:45 +0000 (16:33 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 18 Jan 2007 16:33:45 +0000 (16:33 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2459 94cd875c-1c1d-0410-91d2-eb244daf1a30

src/vsysctl.c

index f0fd9b3..7f6f1dd 100644 (file)
@@ -116,7 +116,7 @@ void handle_setting(const char *dir, const char *name)
     *ptr = '/';
 
   /* we just want the first line, and not the linefeed */
-  if ((ptr = strchr(setting, '\n')) == NULL)
+  if ((ptr = strchr(setting, '\n')) != NULL)
     *ptr = '\0';
 
   fd = EopenD(setting, O_WRONLY, 0);