Don't display an error in lxc_file_for_each_line

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>
This commit is contained in:
Daniel Lezcano 2010-10-03 23:09:36 +02:00 committed by Daniel Lezcano
parent 599916790a
commit 75b08dddec

View 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)