File nagios.avail.host_name.patch of Package nagios

https://bugzilla.novell.com/show_bug.cgi?id=232415

avail.c:2483: warning: comparison with string literal

---
 cgi/avail.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: nagios-2.6/cgi/avail.c
===================================================================
--- nagios-2.6.orig/cgi/avail.c
+++ nagios-2.6/cgi/avail.c
@@ -2480,7 +2480,7 @@ void create_subject_list(void){
 	char *last_host_name="";
 
 	/* we're displaying one or more hosts */
-	if(display_type==DISPLAY_HOST_AVAIL && host_name!=""){
+	if(display_type==DISPLAY_HOST_AVAIL && strcmp(host_name, "")){
 
 		/* we're only displaying a specific host (and summaries for all services associated with it) */
 		if(show_all_hosts==FALSE){
@@ -2499,7 +2499,7 @@ void create_subject_list(void){
 	        }
 
 	/* we're displaying a specific service */
-	else if(display_type==DISPLAY_SERVICE_AVAIL && svc_description!=""){
+	else if(display_type==DISPLAY_SERVICE_AVAIL && strcmp(svc_description, "")){
 
 		/* we're only displaying a specific service */
 		if(show_all_services==FALSE)
@@ -2513,7 +2513,7 @@ void create_subject_list(void){
 	        }
 
 	/* we're displaying one or more hostgroups (the host members of the groups) */
-	else if(display_type==DISPLAY_HOSTGROUP_AVAIL && hostgroup_name!=""){
+	else if(display_type==DISPLAY_HOSTGROUP_AVAIL && strcmp(hostgroup_name, "")){
 
 		/* we're displaying all hostgroups */
 		if(show_all_hostgroups==TRUE){
@@ -2533,7 +2533,7 @@ void create_subject_list(void){
 	        }
 
 	/* we're displaying one or more servicegroups (the host and service members of the groups) */
-	else if(display_type==DISPLAY_SERVICEGROUP_AVAIL && servicegroup_name!=""){
+	else if(display_type==DISPLAY_SERVICEGROUP_AVAIL && strcmp(servicegroup_name, "")){
 
 		/* we're displaying all servicegroups */
 		if(show_all_servicegroups==TRUE){
openSUSE Build Service is sponsored by