projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41133da
)
hsomodem: Remove useless NULL checks before g_free
author
Marcel Holtmann
<marcel@holtmann.org>
Mon, 16 Aug 2010 20:08:08 +0000
(22:08 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Mon, 16 Aug 2010 20:08:08 +0000
(22:08 +0200)
drivers/hsomodem/gprs-context.c
patch
|
blob
|
history
diff --git
a/drivers/hsomodem/gprs-context.c
b/drivers/hsomodem/gprs-context.c
index
eedb703
..
4194d88
100644
(file)
--- a/
drivers/hsomodem/gprs-context.c
+++ b/
drivers/hsomodem/gprs-context.c
@@
-140,8
+140,7
@@
static void hso_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
hso_owancall_up_cb, ncbd, g_free) > 0)
return;
- if (ncbd)
- g_free(ncbd);
+ g_free(ncbd);
gcd->active_context = 0;
@@
-187,8
+186,7
@@
static void hso_gprs_activate_primary(struct ofono_gprs_context *gc,
hso_cgdcont_cb, cbd, g_free) > 0)
return;
error:
- if (cbd)
- g_free(cbd);
+ g_free(cbd);
CALLBACK_WITH_FAILURE(cb, NULL, 0, NULL, NULL, NULL, NULL, data);
}
@@
-213,8
+211,7
@@
static void hso_gprs_deactivate_primary(struct ofono_gprs_context *gc,
return;
error:
- if (cbd)
- g_free(cbd);
+ g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
}