diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2010-11-27 17:39:02 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-29 12:55:49 -0600 |
commit | 67f78f680d4b72d24a280be528a00778dcdf28dc (patch) | |
tree | d10be52dcdeb7048b4b4db6e4b73a92019fd9f42 /plugins/palmpre.c | |
parent | 521071a7853b225713606de3e0421e680f187709 (diff) | |
download | ofono-67f78f680d4b72d24a280be528a00778dcdf28dc.tar.gz |
plugins: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
Diffstat (limited to 'plugins/palmpre.c')
-rw-r--r-- | plugins/palmpre.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/palmpre.c b/plugins/palmpre.c index 17148637..9555871c 100644 --- a/plugins/palmpre.c +++ b/plugins/palmpre.c @@ -57,7 +57,7 @@ static int palmpre_probe(struct ofono_modem *modem) DBG("%p", modem); data = g_try_new0(struct palmpre_data, 1); - if (!data) + if (data == NULL) return -ENOMEM; ofono_modem_set_data(modem, data); @@ -104,11 +104,11 @@ static int palmpre_enable(struct ofono_modem *modem) DBG("%p", modem); device = ofono_modem_get_string(modem, "Device"); - if (!device) + if (device == NULL) device = "/dev/modem0"; options = g_hash_table_new(g_str_hash, g_str_equal); - if (!options) + if (options == NULL) return -ENOMEM; g_hash_table_insert(options, "Baud", "115200"); @@ -116,7 +116,7 @@ static int palmpre_enable(struct ofono_modem *modem) io = g_at_tty_open(device, options); g_hash_table_destroy(options); - if (!io) + if (io == NULL) return -EIO; syntax = g_at_syntax_new_gsm_permissive(); @@ -124,7 +124,7 @@ static int palmpre_enable(struct ofono_modem *modem) g_io_channel_unref(io); g_at_syntax_unref(syntax); - if (!data->chat) + if (data->chat == NULL) return -ENOMEM; if (getenv("OFONO_AT_DEBUG")) |