Merge lp:~laney/ubuntu-app-launch/return-right-type into lp:ubuntu-app-launch/16.04

Proposed by Iain Lane on 2015-12-10
Status: Rejected
Rejected by: Iain Lane on 2015-12-11
Proposed branch: lp:~laney/ubuntu-app-launch/return-right-type
Merge into: lp:ubuntu-app-launch/16.04
Diff against target: 12 lines (+1/-1)
1 file modified
libubuntu-app-launch/ubuntu-app-launch.c (+1/-1)
To merge this branch: bzr merge lp:~laney/ubuntu-app-launch/return-right-type
Reviewer Review Type Date Requested Status
Iain Lane Disapprove on 2015-12-11
PS Jenkins bot (community) continuous-integration Approve on 2015-12-10
Review via email: mp+280182@code.launchpad.net

Commit message

Use g_return_val_if_fail to not return void from a non-void function

Description of the change

To post a comment you must log in.
Iain Lane (laney) wrote :

btw I uploaded this to xenial to unstick some migrations, feel free to overwrite in the ci train

Iain Lane (laney) wrote :
review: Disapprove

Unmerged revisions

209. By Iain Lane on 2015-12-10

Use g_return_val_if_fail to not return void from a non-void function

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntu-app-launch/ubuntu-app-launch.c'
2--- libubuntu-app-launch/ubuntu-app-launch.c 2015-08-17 21:38:29 +0000
3+++ libubuntu-app-launch/ubuntu-app-launch.c 2015-12-10 17:42:08 +0000
4@@ -2403,7 +2403,7 @@
5 const gchar * job_name = g_getenv("UPSTART_JOB");
6 const gchar * instance_name = g_getenv("UPSTART_INSTANCE");
7 const gchar * demangler = g_getenv("UBUNTU_APP_LAUNCH_DEMANGLE_NAME");
8- g_return_if_fail(job_name != NULL);
9+ g_return_val_if_fail(job_name != NULL, FALSE);
10
11 GError * error = NULL;
12 GDBusConnection * bus = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);

Subscribers

People subscribed via source and target branches