diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:16:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:17:30 +0300 |
commit | 9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch) | |
tree | 0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/string_utils.c | |
parent | 337eb8c1de4c57c34520b467d79779153335eecb (diff) |
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/string_utils.c')
-rw-r--r-- | source/blender/blenlib/intern/string_utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c index 3e13b0d3a31..46472d8125d 100644 --- a/source/blender/blenlib/intern/string_utils.c +++ b/source/blender/blenlib/intern/string_utils.c @@ -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); } |