From 75b08dddec3803d313f48bedcfe91737dcf4239a Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Sun, 3 Oct 2010 23:09:36 +0200 Subject: [PATCH] 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 --- src/lxc/parse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lxc/parse.c b/src/lxc/parse.c index ee6b5de83..10510c9d9 100644 --- a/src/lxc/parse.c +++ b/src/lxc/parse.c @@ -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)