tree-wide: when %m is used in log_*, always specify errno explicitly
All those uses were correct, but I think it's better to be explicit. Using implicit errno is too error prone, and with this change we can require (in the sense of a style guideline) that the code is always specified. Helpful query: git grep -n -P 'log_[^s][a-z]+\(.*%m'
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ static int print_gaih_addrtuples(const struct gaih_addrtuple *tuples) {
|
||||
goto numerical_index;
|
||||
|
||||
if (if_indextoname(it->scopeid, ifname) == NULL) {
|
||||
log_warning("if_indextoname(%d) failed: %m", it->scopeid);
|
||||
log_warning_errno(errno, "if_indextoname(%d) failed: %m", it->scopeid);
|
||||
numerical_index:
|
||||
xsprintf(ifname, "%i", it->scopeid);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user