diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-01-30 15:27:40 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-01-30 15:27:40 -0500 |
commit | d8b357e1c50ecff7edbef3370e9024fa0466c917 (patch) | |
tree | a12594b3d5a220fdd399b0649612717b551ab259 | |
parent | bbf26927e2b67aaa68dbc60380d77b7d81898938 (diff) | |
download | dimension-d8b357e1c50ecff7edbef3370e9024fa0466c917.tar.xz |
Remove useless NULL check from profile.c.
-rw-r--r-- | libdimension/profile.c | 19 |
1 files changed, 7 insertions, 12 deletions
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); } } |