Merge pull request #20494 from bluca/snprintf_voidify
tree-wide: voidify unchecked snprintf calls or use snprintf_ok
This commit is contained in:
@@ -20,7 +20,7 @@ const char* nss_status_to_string(enum nss_status status, char *buf, size_t buf_l
|
||||
case NSS_STATUS_RETURN:
|
||||
return "NSS_STATUS_RETURN";
|
||||
default:
|
||||
snprintf(buf, buf_len, "%i", status);
|
||||
(void) snprintf(buf, buf_len, "%i", status);
|
||||
return buf;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char* af_to_string(int family, char *buf, size_t buf_len) {
|
||||
if (name)
|
||||
return name;
|
||||
|
||||
snprintf(buf, buf_len, "%i", family);
|
||||
(void) snprintf(buf, buf_len, "%i", family);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user