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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

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

Post 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]
Locked