]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Don't display an error in lxc_file_for_each_line
authorDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 3 Oct 2010 21:09:36 +0000 (23:09 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Sun, 3 Oct 2010 21:09:36 +0000 (23:09 +0200)
Don't display an error when the callback returns an error different
from zero. A value greater than zero may means "stop". Let's the caller
to check the error.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/parse.c

index ee6b5de8361760e7805f1b41bb501870cac1ad73..10510c9d951ae958853b2efc6ac0f42e7a46be08 100644 (file)
@@ -81,10 +81,8 @@ int lxc_file_for_each_line(const char *file, lxc_file_cb callback, void *data)
 
        while (getline(&line, &len, f) != -1) {
                err = callback(line, data);
-               if (err) {
-                       ERROR("failed to process '%s'", line);
+               if (err)
                        break;
-               }
        }
 
        if (line)