ypxfr(8): Use the correct enum member for checking yp_errno.
authorSascha Wildner <saw@online.de>
Thu, 18 Oct 2012 12:56:38 +0000 (14:56 +0200)
committerSascha Wildner <saw@online.de>
Thu, 18 Oct 2012 12:57:12 +0000 (14:57 +0200)
Revert local CFLAGS, too.

Found-by: gcc47
libexec/ypxfr/Makefile
libexec/ypxfr/ypxfr_main.c

index 203ed43..58a3560 100644 (file)
@@ -1,5 +1,4 @@
 # $FreeBSD: src/libexec/ypxfr/Makefile,v 1.8.2.1 2001/04/25 10:41:06 ru Exp $
-# $DragonFly: src/libexec/ypxfr/Makefile,v 1.2 2003/06/17 04:27:08 dillon Exp $
 
 PROG=  ypxfr
 SRCS=  yp_dblookup.c yp_dbwrite.c yp_error.c \
@@ -14,7 +13,6 @@ WARNS?=       3
 MAN=   ypxfr.8
 
 CFLAGS+= -I.
-CFLAGS+= -Wno-enum-compare
 DPADD= ${LIBRPCSVC}
 LDADD= -lrpcsvc
 
index ec9091e..f991a6a 100644 (file)
@@ -358,7 +358,7 @@ the local domain name isn't set");
                                             ypxfr_mapname,
                                             ypxfr_master, 0)) == 0) {
                yp_error("failed to get order number of %s: %s",
-                               ypxfr_mapname, yp_errno == YPXFR_SUCC ?
+                               ypxfr_mapname, yp_errno == YP_TRUE ?
                                "map has order 0" : ypxfrerr_string(yp_errno));
                ypxfr_exit(YPXFR_YPERR,NULL);
        }
@@ -533,7 +533,7 @@ leave:
                                             ypxfr_mapname,
                                             ypxfr_master, 0)) == 0) {
                yp_error("failed to get order number of %s: %s",
-                               ypxfr_mapname, yp_errno == YPXFR_SUCC ?
+                               ypxfr_mapname, yp_errno == YP_TRUE ?
                                "map has order 0" : ypxfrerr_string(yp_errno));
                ypxfr_exit(YPXFR_YPERR, ypxfr_temp_map);
        }