examples: explicitly compare pointers to NULL
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 27 Nov 2010 19:38:59 +0000 (17:38 -0200)
committerDenis Kenzior <denkenz@gmail.com>
Mon, 29 Nov 2010 17:59:07 +0000 (11:59 -0600)
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>

examples/nettime.c

index 60045be..3843ce2 100644 (file)
@@ -50,7 +50,7 @@ static void example_nettime_remove(struct ofono_nettime_context *context)
 static void example_nettime_info_received(struct ofono_nettime_context *context,
                                                struct ofono_network_time *info)
 {
-       if (!info)
+       if (info == NULL)
                return;
 
        ofono_debug("Received a network time notification on modem: %p",