From d8b357e1c50ecff7edbef3370e9024fa0466c917 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 30 Jan 2011 15:27:40 -0500 Subject: Remove useless NULL check from profile.c. --- libdimension/profile.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'libdimension/profile.c') diff --git a/libdimension/profile.c b/libdimension/profile.c index 337a025..557e385 100644 --- a/libdimension/profile.c +++ b/libdimension/profile.c @@ -49,19 +49,14 @@ static void dmnsn_profile_globalize(void *ptr) { dmnsn_branch *branch = ptr; - if (dmnsn_profile) { - dmnsn_branch *global - = dmnsn_dictionary_at(dmnsn_profile, branch->location); - if (global) { - global->predicted += branch->predicted; - global->branches += branch->branches; - dmnsn_free(branch->location); - } else { - dmnsn_dictionary_insert(dmnsn_profile, branch->location, - branch); - } - } else { + dmnsn_branch *global = dmnsn_dictionary_at(dmnsn_profile, branch->location); + if (global) { + global->predicted += branch->predicted; + global->branches += branch->branches; dmnsn_free(branch->location); + } else { + dmnsn_dictionary_insert(dmnsn_profile, branch->location, + branch); } } -- cgit v1.2.3