halt='Use STREQ instead of !STRNEQ' \
$(_sc_search_regexp)
+sc_prohibit_verbose_strcat:
+ @prohibit='strncat\([^,]*,\s+([^,]*),\s+strlen\(\1\)\)' \
+ in_vc_files='\.[ch]$$' \
+ halt='Use strcat(a, b) instead of strncat(a, b, strlen(b))' \
+ $(_sc_search_regexp)
+
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
/* Allocate space for 'nextents' regex_unit strings plus a comma for each */
if (VIR_ALLOC_N(regex, nextents * (strlen(regex_unit) + 1) + 1) < 0)
goto cleanup;
- strncat(regex, regex_unit, strlen(regex_unit));
+ strcat(regex, regex_unit);
for (i = 1; i < nextents; i++) {
/* "," is the separator of "devices" field */
strcat(regex, ",");
- strncat(regex, regex_unit, strlen(regex_unit));
+ strcat(regex, regex_unit);
}
if (VIR_ALLOC(reg) < 0)