Cleanup: style, use braces for blenlib
This commit is contained in:
@@ -68,8 +68,9 @@ size_t BLI_split_name_num(char *left, int *nr, const char *name, const char deli
|
||||
left[a] = '\0'; /* truncate left part here */
|
||||
*nr = atol(name + a + 1);
|
||||
/* casting down to an int, can overflow for large numbers */
|
||||
if (*nr < 0)
|
||||
if (*nr < 0) {
|
||||
*nr = 0;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
else if (isdigit(name[a]) == 0) {
|
||||
@@ -368,8 +369,9 @@ bool BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim
|
||||
BLI_assert(name_len > 1);
|
||||
|
||||
/* See if we are given an empty string */
|
||||
if (ELEM(NULL, vlink, defname))
|
||||
if (ELEM(NULL, vlink, defname)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return BLI_uniquename_cb(uniquename_unique_check, &data, defname, delim, GIVE_STRADDR(vlink, name_offs), name_len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user