mirror of
https://github.com/sailfishos/ofono
synced 2025-12-01 23:21:04 +08:00
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>
This commit is contained in:
committed by
Denis Kenzior
parent
521071a785
commit
67f78f680d
@@ -398,7 +398,7 @@ static int n900_probe(struct ofono_modem *modem)
|
||||
DBG("(%p) with %s", modem, ifname);
|
||||
|
||||
idx = g_isi_modem_by_name(ifname);
|
||||
if (!idx) {
|
||||
if (idx == NULL) {
|
||||
DBG("Interface=%s: %s", ifname, strerror(errno));
|
||||
return -errno;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ static int n900_probe(struct ofono_modem *modem)
|
||||
}
|
||||
|
||||
isi = g_new0(struct isi_data, 1);
|
||||
if (!isi) {
|
||||
if (isi == NULL) {
|
||||
gpio_remove(modem);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ static void n900_set_online(struct ofono_modem *modem,
|
||||
|
||||
DBG("(%p) with %s", modem, isi->ifname);
|
||||
|
||||
if (!cbd)
|
||||
if (cbd == NULL)
|
||||
goto error;
|
||||
|
||||
if (isi->power_state != POWER_STATE_ON)
|
||||
|
||||
Reference in New Issue
Block a user