Skip to content

Commit f1c6f21

Browse files
jfsmigfvennetier
authored andcommitted
alerting: Add missing parentheses
1 parent 4415d1d commit f1c6f21

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

main/alerting.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,43 @@ gridinit_alerting_configure(const gchar *path, const gchar *symbol,
4545
TRACE("trying to configure the alerting with the module [%s] and the symbol [%s]",
4646
path, symbol);
4747
if (!symbol || !path) {
48-
if (err)
48+
if (err) {
4949
*err = g_error_printf(LOG_DOMAIN, 500, "Invalid parameter");
50-
return FALSE;
50+
}
51+
return FALSE;
5152
}
5253
if (module != NULL) {
53-
if (err)
54+
if (err) {
5455
*err = g_error_printf(LOG_DOMAIN, 500, "Module already loaded");
56+
}
5557
return FALSE;
5658
}
5759

5860
/* Open the module and locate the exported symbol */
5961
if (NULL == (module = g_module_open (path, 0))) {
60-
if (err)
62+
if (err) {
6163
*err = g_error_printf(LOG_DOMAIN, 500,
6264
"Cannot load the plug-in from file %s (%s)",
6365
path, g_module_error());
66+
}
6467
return FALSE;
6568
}
6669

6770
gpointer pointer = NULL;
6871
if (!g_module_symbol(module, symbol, &pointer) || !pointer) {
69-
if (err)
72+
if (err) {
7073
*err = g_error_printf(LOG_DOMAIN, 500,
7174
"Cannot get the exported structure (%s) from the plug-in %p (%s)",
7275
symbol, (void*)module, g_module_error());
76+
}
7377
return FALSE;
7478
}
7579

7680
handle = pointer;
77-
if (handle->init)
81+
if (handle->init) {
7882
handle->init(handle->module_data, ht_params);
79-
83+
}
84+
8085
return TRUE;
8186
}
8287

0 commit comments

Comments
 (0)