On 06/02/2011 12:19 AM, Jan Friesse wrote: > Steven Dake wrote: >> On 06/01/2011 09:14 AM, Jan Friesse wrote: >>> Signed-off-by: Jan Friesse <[email protected]> >>> --- >>> exec/mainconfig.c | 4 +++- >>> 1 files changed, 3 insertions(+), 1 deletions(-) >>> >>> diff --git a/exec/mainconfig.c b/exec/mainconfig.c >>> index 44bd47a..c7df8c6 100644 >>> --- a/exec/mainconfig.c >>> +++ b/exec/mainconfig.c >>> @@ -614,7 +614,9 @@ static void >>> main_objdb_reload_notify(objdb_reload_notify_type_t type, int flush, >>> /* >>> * Reload the logsys configuration >>> */ >>> - logsys_format_set(NULL); >>> + if (logsys_format_set(NULL) < 0) { >>> + fprintf (stderr, "Unable to setup logging format.\n"); >>> + } >>> corosync_main_config_read_logging(global_objdb, >>> &error_string); >>> } >> >> >> please check for == -1 rather then < 0. >> >> Regards >> -steve > Take a look to: > include/corosync/engine/logsys.h:319. > I was trying to be consistent, so I would prefer ether both checked for > -1 or both < 0. I don't have strong opinion which option is better. >
Somewhat arbitrary what the code does today, but if the error code is always -1, we should always check for -1 to prevent a situation where other results may trigger unintended consequences. _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
