cov (many): make sure all _set() functions return a signed int

in the body it can return -1, and callers check for -1.
but the return type is unsigned int?



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2849 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Angus Salkeld 2010-05-18 00:46:08 +00:00
parent 2a23dfc585
commit ad71b66c7b
2 changed files with 12 additions and 12 deletions

View File

@ -1023,7 +1023,7 @@ int _logsys_system_setup(
return (0);
}
unsigned int _logsys_subsys_create (const char *subsys)
int _logsys_subsys_create (const char *subsys)
{
int i;
@ -1351,7 +1351,7 @@ void logsys_fork_completed (void)
_logsys_wthread_create ();
}
unsigned int logsys_config_mode_set (const char *subsys, unsigned int mode)
int logsys_config_mode_set (const char *subsys, unsigned int mode)
{
int i;
@ -1440,7 +1440,7 @@ char *logsys_format_get (void)
return format_buffer;
}
unsigned int logsys_config_syslog_facility_set (
int logsys_config_syslog_facility_set (
const char *subsys,
unsigned int facility)
{
@ -1468,7 +1468,7 @@ unsigned int logsys_config_syslog_facility_set (
return i;
}
unsigned int logsys_config_syslog_priority_set (
int logsys_config_syslog_priority_set (
const char *subsys,
unsigned int priority)
{
@ -1492,7 +1492,7 @@ unsigned int logsys_config_syslog_priority_set (
return i;
}
unsigned int logsys_config_logfile_priority_set (
int logsys_config_logfile_priority_set (
const char *subsys,
unsigned int priority)
{
@ -1516,7 +1516,7 @@ unsigned int logsys_config_logfile_priority_set (
return i;
}
unsigned int logsys_config_debug_set (
int logsys_config_debug_set (
const char *subsys,
unsigned int debug)
{

View File

@ -167,7 +167,7 @@ extern int _logsys_system_setup(
extern int _logsys_config_subsys_get (
const char *subsys);
extern unsigned int _logsys_subsys_create (const char *subsys);
extern int _logsys_subsys_create (const char *subsys);
extern int _logsys_rec_init (unsigned int size);
@ -237,15 +237,15 @@ extern char *logsys_format_get (void);
*
* Pass a NULL subsystem to change them all
*/
extern unsigned int logsys_config_syslog_facility_set (
extern int logsys_config_syslog_facility_set (
const char *subsys,
unsigned int facility);
extern unsigned int logsys_config_syslog_priority_set (
extern int logsys_config_syslog_priority_set (
const char *subsys,
unsigned int priority);
extern unsigned int logsys_config_mode_set (
extern int logsys_config_mode_set (
const char *subsys,
unsigned int mode);
@ -262,7 +262,7 @@ extern int logsys_config_file_set (
const char **error_string,
const char *file);
extern unsigned int logsys_config_logfile_priority_set (
extern int logsys_config_logfile_priority_set (
const char *subsys,
unsigned int priority);
@ -271,7 +271,7 @@ extern unsigned int logsys_config_logfile_priority_set (
* everything is sent everywhere. priority values
* for file and syslog are not overwritten.
*/
extern unsigned int logsys_config_debug_set (
extern int logsys_config_debug_set (
const char *subsys,
unsigned int value);