Page 1 of 1

[Nagios-devel] [PATCH] fix uninitialized variables in

Posted: Fri Sep 08, 2006 12:47 am
by Guest

../common/comments.c: In function 'delete_service_comment':
../common/comments.c:257: warning: 'result' is used uninitialized in this function
../common/comments.c: In function 'delete_host_comment':
../common/comments.c:245: warning: 'result' is used uninitialized in this function

---
common/comments.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)

Index: nagios-2.5/common/comments.c
===================================================================
--- nagios-2.5.orig/common/comments.c
+++ nagios-2.5/common/comments.c
@@ -237,24 +237,16 @@ int delete_comment(int type, unsigned lo

/* deletes a host comment */
int delete_host_comment(unsigned long comment_id){
- int result;
-
/* delete the comment from memory */
- delete_comment(HOST_COMMENT,comment_id);
-
- return result;
+ return delete_comment(HOST_COMMENT,comment_id);
}



/* deletes a service comment */
int delete_service_comment(unsigned long comment_id){
- int result;
-
/* delete the comment from memory */
- delete_comment(SERVICE_COMMENT,comment_id);
-
- return result;
+ return delete_comment(SERVICE_COMMENT,comment_id);
}







This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]