diff options
Diffstat (limited to 'source/blender/blenlib/intern/BLI_linklist.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_linklist.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c index 66fcfd21fbb..a0b61e7945c 100644 --- a/source/blender/blenlib/intern/BLI_linklist.c +++ b/source/blender/blenlib/intern/BLI_linklist.c @@ -38,17 +38,12 @@ int BLI_linklist_length(LinkNode *list) { - if (0) { - return list ? (1 + BLI_linklist_length(list->next)) : 0; - } - else { - int len; + int len; - for (len = 0; list; list = list->next) - len++; - - return len; - } + for (len = 0; list; list = list->next) + len++; + + return len; } int BLI_linklist_index(LinkNode *list, void *ptr) |