Browse Source

Merge trunk revision 2849:
r2849 | asalkeld | 2010-05-17 17:46:08 -0700 (Mon, 17 May 2010) | 6 lines

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/branches/flatiron@2891 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 15 years ago
parent
commit
07bc1b0f49
2 changed files with 12 additions and 12 deletions
  1. 6 6
      exec/logsys.c
  2. 6 6
      include/corosync/engine/logsys.h

+ 6 - 6
exec/logsys.c

@@ -1025,7 +1025,7 @@ int _logsys_system_setup(
 	return (0);
 	return (0);
 }
 }
 
 
-unsigned int _logsys_subsys_create (const char *subsys)
+int _logsys_subsys_create (const char *subsys)
 {
 {
 	int i;
 	int i;
 
 
@@ -1353,7 +1353,7 @@ void logsys_fork_completed (void)
 	_logsys_wthread_create ();
 	_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;
 	int i;
 
 
@@ -1442,7 +1442,7 @@ char *logsys_format_get (void)
 	return format_buffer;
 	return format_buffer;
 }
 }
 
 
-unsigned int logsys_config_syslog_facility_set (
+int logsys_config_syslog_facility_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int facility)
 	unsigned int facility)
 {
 {
@@ -1470,7 +1470,7 @@ unsigned int logsys_config_syslog_facility_set (
 	return i;
 	return i;
 }
 }
 
 
-unsigned int logsys_config_syslog_priority_set (
+int logsys_config_syslog_priority_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int priority)
 	unsigned int priority)
 {
 {
@@ -1494,7 +1494,7 @@ unsigned int logsys_config_syslog_priority_set (
 	return i;
 	return i;
 }
 }
 
 
-unsigned int logsys_config_logfile_priority_set (
+int logsys_config_logfile_priority_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int priority)
 	unsigned int priority)
 {
 {
@@ -1518,7 +1518,7 @@ unsigned int logsys_config_logfile_priority_set (
 	return i;
 	return i;
 }
 }
 
 
-unsigned int logsys_config_debug_set (
+int logsys_config_debug_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int debug)
 	unsigned int debug)
 {
 {

+ 6 - 6
include/corosync/engine/logsys.h

@@ -167,7 +167,7 @@ extern int _logsys_system_setup(
 extern int _logsys_config_subsys_get (
 extern int _logsys_config_subsys_get (
 	const char *subsys);
 	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);
 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
  * 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,
 	const char *subsys,
 	unsigned int facility);
 	unsigned int facility);
 
 
-extern unsigned int logsys_config_syslog_priority_set (
+extern int logsys_config_syslog_priority_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int priority);
 	unsigned int priority);
 
 
-extern unsigned int logsys_config_mode_set (
+extern int logsys_config_mode_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int mode);
 	unsigned int mode);
 
 
@@ -262,7 +262,7 @@ extern int logsys_config_file_set (
 	const char **error_string,
 	const char **error_string,
 	const char *file);
 	const char *file);
 
 
-extern unsigned int logsys_config_logfile_priority_set (
+extern int logsys_config_logfile_priority_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int priority);
 	unsigned int priority);
 
 
@@ -271,7 +271,7 @@ extern unsigned int logsys_config_logfile_priority_set (
  * everything is sent everywhere. priority values
  * everything is sent everywhere. priority values
  * for file and syslog are not overwritten.
  * for file and syslog are not overwritten.
  */
  */
-extern unsigned int logsys_config_debug_set (
+extern int logsys_config_debug_set (
 	const char *subsys,
 	const char *subsys,
 	unsigned int value);
 	unsigned int value);