mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 17:30:53 +00:00
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:
parent
599916790a
commit
75b08dddec
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user