[Github-comments] [geany/geany] build.c: Fix memory leak & make some small refactorings (#2271)

Nick Treleaven notifications at xxxxx
Sun Sep 1 17:56:37 UTC 2019


ntrel commented on this pull request.



> @@ -1547,25 +1542,17 @@ static void set_stop_button(gboolean stop)
 	GtkToolButton *run_button;
 
 	run_button = GTK_TOOL_BUTTON(toolbar_get_widget_by_name("Run"));
-	if (run_button != NULL)
-		button_stock_id = gtk_tool_button_get_stock_id(run_button);
+	if (!run_button) return;

I've added the line break to comply with HACKING. There are 3 existing if statements in build.c with a return clause on the same line, but I see that there are not many of these in `src/`.

> space after !

I haven't done this, there are 16 matches for the regex `\bif \(!\S` in build.c.

-- 
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/pull/2271#discussion_r319769221
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190901/cd303124/attachment.html>


More information about the Github-comments mailing list