summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-01-30 15:27:40 -0500
committerTavian Barnes <tavianator@gmail.com>2011-01-30 15:27:40 -0500
commitd8b357e1c50ecff7edbef3370e9024fa0466c917 (patch)
treea12594b3d5a220fdd399b0649612717b551ab259 /libdimension
parentbbf26927e2b67aaa68dbc60380d77b7d81898938 (diff)
downloaddimension-d8b357e1c50ecff7edbef3370e9024fa0466c917.tar.xz
Remove useless NULL check from profile.c.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/profile.c19
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);
}
}