Hi Lucas > +M13: Check for pointer being NULL > +================================= > + > +When checking if a pointer or a return value is NULL, explicitly > +compare to NULL rather than use the shorter check with "!" operator. > + > +Example: > +1) > +array = g_try_new0(int, 20); > +if (!array) // Wrong > + return; > + > +2) > +if (!g_at_chat_get_slave(chat)) // Wrong > + return -EINVAL; > + > +3) > +array = g_try_new0(int, 20); > +if (!array) // Correct
Shouldn't be if (array == NULL) // Correct :)? BR, Rajesh _______________________________________________ ofono mailing list [email protected] http://lists.ofono.org/listinfo/ofono
