Cleanup: remove redundant calls to strlen

This commit is contained in:
Campbell Barton
2025-07-26 12:08:15 +00:00
parent 0531230a35
commit faed51f195
6 changed files with 7 additions and 7 deletions

View File

@@ -317,8 +317,8 @@ size_t BLI_string_flip_side_name(char *name_dst,
if (strip_number == false) {
BLI_strncpy(number, index, name_dst_maxncpy);
}
*index = 0;
len = BLI_strnlen(name_dst, name_dst_maxncpy);
*index = '\0';
len = size_t(index - name_dst); /* Same as `strlen(name_dst)`. */
}
}