FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove some useless trailing empty `return` · struct/isoalloc@8e6d874 · GitHub

Commit 8e6d874

Browse files
committed
Remove some useless trailing empty return
1 parent c0cacfb commit 8e6d874

5 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎src/iso_alloc.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ INTERNAL_HIDDEN void verify_all_zones(void) {
9494
LOCK_ROOT();
9595
_verify_all_zones();
9696
UNLOCK_ROOT();
97-
return;
9897
}
9998

10099
INTERNAL_HIDDEN void verify_zone(iso_alloc_zone *zone) {
101100
LOCK_ROOT();
102101
_verify_zone(zone);
103102
UNLOCK_ROOT();
104-
return;
105103
}
106104

107105
INTERNAL_HIDDEN void _verify_all_zones(void) {
@@ -157,7 +155,6 @@ INTERNAL_HIDDEN void _verify_zone(iso_alloc_zone *zone) {
157155
}
158156

159157
MASK_ZONE_PTRS(zone);
160-
return;
161158
}
162159
#endif
163160

@@ -466,7 +463,6 @@ INTERNAL_HIDDEN void _iso_alloc_destroy_zone(iso_alloc_zone *zone) {
466463
madvise(zone->user_pages_start, ZONE_USER_SIZE, MADV_DONTNEED);
467464
POISON_ZONE(zone);
468465
UNLOCK_ROOT();
469-
return;
470466
} else {
471467
/* The only time we ever destroy a default non-custom zone
472468
* is from the destructor so its safe unmap pages */
@@ -1516,8 +1512,6 @@ INTERNAL_HIDDEN void iso_free_chunk_from_zone(iso_alloc_zone *zone, void *p, boo
15161512
POISON_ZONE_CHUNK(zone, p);
15171513

15181514
populate_thread_zone_cache(zone);
1519-
1520-
return;
15211515
}
15221516

15231517
INTERNAL_HIDDEN void _iso_free(void *p, bool permanent) {
@@ -1567,7 +1561,6 @@ INTERNAL_HIDDEN void _iso_free(void *p, bool permanent) {
15671561
}
15681562

15691563
iso_free_big_zone(big_zone, permanent);
1570-
return;
15711564
}
15721565
}
15731566

‎src/iso_alloc.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ EXTERNAL_API void *operator new(size_t size) {
1818

1919
EXTERNAL_API void operator delete(void *p) noexcept {
2020
iso_free(p);
21-
return;
2221
}
2322

2423
EXTERNAL_API void *operator new[](size_t size) {
@@ -27,7 +26,6 @@ EXTERNAL_API void *operator new[](size_t size) {
2726

2827
EXTERNAL_API void operator delete[](void *p) noexcept {
2928
iso_free(p);
30-
return;
3129
}
3230

3331
EXTERNAL_API void *operator new(size_t size, const std::nothrow_t &) noexcept {

‎src/iso_alloc_interfaces.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ EXTERNAL_API NO_DISCARD void *iso_calloc(size_t nmemb, size_t size) {
1414

1515
EXTERNAL_API void iso_free(void *p) {
1616
_iso_free(p, false);
17-
return;
1817
}
1918

2019
EXTERNAL_API void iso_free_permanently(void *p) {
2120
_iso_free(p, true);
22-
return;
2321
}
2422

2523
EXTERNAL_API size_t iso_chunksz(void *p) {
@@ -129,7 +127,6 @@ EXTERNAL_API void iso_alloc_destroy_zone(iso_alloc_zone_handle *zone) {
129127

130128
zone = (iso_alloc_zone_handle *) ((uintptr_t) zone ^ (uintptr_t) _root->zone_handle_mask);
131129
_iso_alloc_destroy_zone(zone);
132-
return;
133130
}
134131

135132
EXTERNAL_API NO_DISCARD iso_alloc_zone_handle *iso_alloc_new_zone(size_t size) {
@@ -176,7 +173,6 @@ EXTERNAL_API uint64_t iso_alloc_mem_usage() {
176173

177174
EXTERNAL_API void iso_verify_zones() {
178175
verify_all_zones();
179-
return;
180176
}
181177

182178
EXTERNAL_API void iso_verify_zone(iso_alloc_zone_handle *zone) {
@@ -187,7 +183,6 @@ EXTERNAL_API void iso_verify_zone(iso_alloc_zone_handle *zone) {
187183
}
188184

189185
verify_zone(zone);
190-
return;
191186
}
192187

193188
#if EXPERIMENTAL

‎src/iso_alloc_profiler.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,5 +255,4 @@ INTERNAL_HIDDEN void _initialize_profiler() {
255255
LOG_AND_ABORT("Cannot open file descriptor for profiler.data");
256256
}
257257
#endif
258-
return;
259258
}

‎src/iso_alloc_search.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,5 @@ INTERNAL_HIDDEN void _iso_alloc_search_stack(uint8_t *stack_start) {
123123
LOG_AND_ABORT("Pointer to bitmap for zone[%d] found in stack @ %p", zone->index, p);
124124
}
125125
}
126-
127-
return;
128126
}
129127
#endif

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL