Merge lp:~kalikiana/midori/tautological into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6238
Merged at revision: 6244
Proposed branch: lp:~kalikiana/midori/tautological
Merge into: lp:midori
Diff against target: 24 lines (+4/-3)
1 file modified
midori/midori-frontend.c (+4/-3)
To merge this branch: bzr merge lp:~kalikiana/midori/tautological
Reviewer Review Type Date Requested Status
gue5t gue5t Approve
Review via email: mp+172209@code.launchpad.net

Commit message

Fix tautological use of G_MAXINT with enum

Description of the change

Fix tautological use of G_MAXINT with enum

To post a comment you must log in.
Revision history for this message
gue5t gue5t (gue5t) wrote :

The return value of midori_frontend_diagnostic_dialog should also be changed to gint, since the values it returns can be outside the range of the MidoriStartup enum. Otherwise looks good, nice to see this kind of subtle gotcha get fixed.

review: Needs Fixing
lp:~kalikiana/midori/tautological updated
6238. By Cris Dywan

Declare midori_frontend_diagnostic_dialog to return gint

Revision history for this message
gue5t gue5t (gue5t) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-frontend.c'
2--- midori/midori-frontend.c 2013-06-19 20:27:53 +0000
3+++ midori/midori-frontend.c 2013-06-30 15:01:25 +0000
4@@ -316,7 +316,7 @@
5 gtk_dialog_response (dialog, GTK_RESPONSE_HELP);
6 }
7
8-static MidoriStartup
9+static gint
10 midori_frontend_diagnostic_dialog (MidoriApp* app,
11 MidoriWebSettings* settings,
12 KatzeArray* session)
13@@ -566,9 +566,10 @@
14 && open_uris && !execute_commands)
15 || diagnostic_dialog)
16 {
17- load_on_startup = midori_frontend_diagnostic_dialog (app, settings, session);
18- if (load_on_startup == G_MAXINT)
19+ gint response = midori_frontend_diagnostic_dialog (app, settings, session);
20+ if (response == G_MAXINT)
21 return NULL;
22+ load_on_startup = response;
23 }
24 g_object_set_data (G_OBJECT (settings), "load-on-startup", GINT_TO_POINTER (load_on_startup));
25

Subscribers

People subscribed via source and target branches

to all changes: