[Initng-svn] r4415 - initng/trunk/plugins/reload

svn at initng.thinktux.net svn at initng.thinktux.net
Thu Jun 8 14:21:59 CEST 2006


Author: jimmy
Date: Thu Jun  8 14:21:58 2006
New Revision: 4415

Modified:
   initng/trunk/plugins/reload/initng_reload.c
   initng/trunk/plugins/reload/initng_reload.h

Log:
Small cleanups.


Modified: initng/trunk/plugins/reload/initng_reload.c
==============================================================================
--- initng/trunk/plugins/reload/initng_reload.c	(original)
+++ initng/trunk/plugins/reload/initng_reload.c	Thu Jun  8 14:21:58 2006
@@ -359,9 +359,9 @@
 
 		memset(&entry, 0, sizeof entry);
 		strncpy(entry.name, current->name, MAX_SERVICE_NAME_STRING_LEN);
-		strncpy(entry.state, current->current_state->state_name, 100);
+		strncpy(entry.state, current->current_state->state_name, MAX_SERVICE_STATE_LEN);
 		if (current->type)
-			strncpy(entry.type, current->type->name, 100);
+			strncpy(entry.type, current->type->name, MAX_TYPE_STRING_LEN);
 		memcpy(&entry.time_current_state, &current->time_current_state,
 			   sizeof(struct timeval));
 

Modified: initng/trunk/plugins/reload/initng_reload.h
==============================================================================
--- initng/trunk/plugins/reload/initng_reload.h	(original)
+++ initng/trunk/plugins/reload/initng_reload.h	Thu Jun  8 14:21:58 2006
@@ -24,6 +24,7 @@
  * and probably hang initng
  */
 #define MAX_SERVICE_NAME_STRING_LEN 200
+#define MAX_SERVICE_STATE_LEN 100
 #define MAX_DATA_STRING_LEN 200
 #define MAX_TYPE_STRING_LEN 100
 #define MAX_PROCESSES 6
@@ -66,7 +67,7 @@
 {
 	char name[MAX_SERVICE_NAME_STRING_LEN + 1];
 	char type[MAX_TYPE_STRING_LEN + 1];
-	char state[101];
+	char state[MAX_SERVICE_STATE_LEN + 1];
 	struct timeval time_current_state;
 
 	/*  struct with some processes */


More information about the Initng-svn mailing list