Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 14:37:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 14:38:07 +0300
commitc04088fed1b8faea6b2928bb5e09ab367076950c (patch)
treef4aed4491f5af44dade7d84a52901a56fd6dddd7 /intern/guardedalloc/intern/mallocn_guarded_impl.c
parent3d48d99647b59a6f0461baa4456660917f1bbda6 (diff)
Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule. This should be the final commit of the series of commits that addresses this particular rule. No functional changes.
Diffstat (limited to 'intern/guardedalloc/intern/mallocn_guarded_impl.c')
-rw-r--r--intern/guardedalloc/intern/mallocn_guarded_impl.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c
index 2c207935e43..6024a9919b3 100644
--- a/intern/guardedalloc/intern/mallocn_guarded_impl.c
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -249,9 +249,8 @@ size_t MEM_guarded_allocN_len(const void *vmemh)
memh--;
return memh->len;
}
- else {
- return 0;
- }
+
+ return 0;
}
void *MEM_guarded_dupallocN(const void *vmemh)
@@ -611,12 +610,11 @@ static int compare_len(const void *p1, const void *p2)
if (pb1->len < pb2->len) {
return 1;
}
- else if (pb1->len == pb2->len) {
+ if (pb1->len == pb2->len) {
return 0;
}
- else {
- return -1;
- }
+
+ return -1;
}
void MEM_guarded_printmemlist_stats(void)
@@ -682,7 +680,7 @@ void MEM_guarded_printmemlist_stats(void)
if (a == b) {
continue;
}
- else if (strcmp(printblock[a].name, printblock[b].name) == 0) {
+ if (strcmp(printblock[a].name, printblock[b].name) == 0) {
printblock[b].len += printblock[a].len;
printblock[b].items++;
}
@@ -1213,8 +1211,7 @@ const char *MEM_guarded_name_ptr(void *vmemh)
memh--;
return memh->name;
}
- else {
- return "MEM_guarded_name_ptr(NULL)";
- }
+
+ return "MEM_guarded_name_ptr(NULL)";
}
#endif /* NDEBUG */