tree-wide: correct cases where return log_{error,warning} is used without value
In various cases, we would say 'return log_warning()' or 'return log_error()'. Those functions return 0 if no error is passed in. For log_warning or log_error this doesn't make sense, and we generally want to propagate the error. In the few cases where the error should be ignored, I think it's better to split it in two, and call 'return 0' on a separate line.
This commit is contained in:
@@ -350,7 +350,8 @@ static int determine_hostname(char **full_hostname, char **llmnr_hostname, char
|
||||
#if HAVE_LIBIDN2
|
||||
r = idn2_to_unicode_8z8z(label, &utf8, 0);
|
||||
if (r != IDN2_OK)
|
||||
return log_error("Failed to undo IDNA: %s", idn2_strerror(r));
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EUCLEAN),
|
||||
"Failed to undo IDNA: %s", idn2_strerror(r));
|
||||
assert(utf8_is_valid(utf8));
|
||||
|
||||
r = strlen(utf8);
|
||||
|
||||
Reference in New Issue
Block a user