~ chicken-core (chicken-5) 72ab8960ce9dd17fd45950df694ab822adbd7b03
commit 72ab8960ce9dd17fd45950df694ab822adbd7b03
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Sun Sep 17 17:30:18 2017 +1200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun Sep 17 12:21:00 2017 +0200
Drop unnecessary check for NULL trace buffer keys
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/runtime.c b/runtime.c
index 629b14ed..1113defc 100644
--- a/runtime.c
+++ b/runtime.c
@@ -3976,10 +3976,8 @@ static void take_profile_sample()
tb = trace_buffer_top - 1;
}
- key = tb->raw;
- if (key == NULL) return; /* May happen while in C_trace() */
-
/* We could also just hash the pointer but that's a bit trickier */
+ key = tb->raw;
bp = profile_table + hash_string(C_strlen(key), key, PROFILE_TABLE_SIZE, 0, 0);
b = *bp;
Trap