[Github-comments] [geany/geany-plugins] Fix cppcheck warnings (#644)

Matthew Brush notifications at xxxxx
Mon Nov 6 01:30:50 UTC 2017


codebrainz commented on this pull request.



> @@ -80,7 +80,9 @@ static gboolean test(gint ordinal, const gchar *input, const gchar *completion_n
 	else if (!completion_needed && !success)
 		return TRUE;
 
-	if (strcmp(c.completion, completion_needed) != 0)
+	if ((!completion_needed && c.completion) ||
+		(completion_needed && !c.completion) ||
+		strcmp(c.completion, completion_needed) != 0)

Could also use [`g_strcmp0`](https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strcmp0).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/644#pullrequestreview-74303492
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171106/813b6516/attachment.html>


More information about the Github-comments mailing list