* Andreas Ericsson ([email protected]) wrote:
> It looks as if that should be impossible, but I've had a few beers right
> now and I'm leaving for a one-week vacation in egypt in ten hours, so
> I'll have to postpone a further analysis of this patch and its ultimate
> consequences.
Alright then. The code below avoids an uneeded pointer check
Have a nice vacation.
Index: base/notifications.c
===================================================================
--- base/notifications.c (revision 2455)
+++ base/notifications.c (working copy)
@@ -338,11 +338,7 @@
}
/* find the host this service is associated with */
- if((temp_host = (host *)svc->host_ptr) == NULL)
- return ERROR;
-
- /* if we couldn't find the host, return an error */
- if(temp_host == NULL) {
+ if((temp_host = (host *)svc->host_ptr) == NULL) {
log_debug_info(DEBUGL_NOTIFICATIONS, 1, "Couldn't find the host associated with this service, so we won't send a notification.\n");
return ERROR;
}
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]