Commit 75b08ddd by Daniel Lezcano Committed by Daniel Lezcano

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: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 59991679
...@@ -81,10 +81,8 @@ int lxc_file_for_each_line(const char *file, lxc_file_cb callback, void *data) ...@@ -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) { while (getline(&line, &len, f) != -1) {
err = callback(line, data); err = callback(line, data);
if (err) { if (err)
ERROR("failed to process '%s'", line);
break; break;
}
} }
if (line) if (line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment