From 425dd8accbbf3b90c690e947f60a6bccc04a3781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 6 Apr 2002 19:08:02 +0000 Subject: [PATCH] Fix warnings. Sponsored by: DARPA, NAI Labs --- libexec/ypxfr/ypxfr_extern.h | 2 +- libexec/ypxfr/ypxfr_main.c | 22 +++++++++++----------- libexec/ypxfr/ypxfr_misc.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libexec/ypxfr/ypxfr_extern.h b/libexec/ypxfr/ypxfr_extern.h index acfa10589076..f843b645b6dd 100644 --- a/libexec/ypxfr/ypxfr_extern.h +++ b/libexec/ypxfr/ypxfr_extern.h @@ -49,7 +49,7 @@ extern int debug; extern enum ypstat yp_errno; extern void yp_error(const char *, ...); extern int _yp_check(char **); -extern char *ypxfrerr_string(ypxfrstat); +extern const char *ypxfrerr_string(ypxfrstat); extern DB *yp_open_db_rw(const char *, const char *, const int); extern void yp_init_dbs(void); extern int yp_put_record(DB *, DBT *, DBT *, int); diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c index f1be4f24f26b..5c22d00f957d 100644 --- a/libexec/ypxfr/ypxfr_main.c +++ b/libexec/ypxfr/ypxfr_main.c @@ -441,7 +441,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to write order number to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } key.data = "YP_MASTER_NAME"; @@ -451,7 +451,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to write master name to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } key.data = "YP_DOMAIN_NAME"; @@ -461,7 +461,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to write domain name to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } snprintf (buf, sizeof(buf), "%s:%s", ypxfr_source_host, ypxfr_mapname); @@ -473,7 +473,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to write input name to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } @@ -487,7 +487,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to write output name to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } if (interdom) { @@ -498,7 +498,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to add interdomain flag to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } } @@ -510,7 +510,7 @@ the local domain name isn't set"); if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { yp_error("failed to add secure flag to database"); - ypxfr_exit(YPXFR_DBM,&ypxfr_temp_map); + ypxfr_exit(YPXFR_DBM,ypxfr_temp_map); } } @@ -519,7 +519,7 @@ the local domain name isn't set"); if (ypxfr_get_map(ypxfr_mapname,ypxfr_source_domain, ypxfr_source_host, ypxfr_foreach)){ yp_error("failed to retrieve map from source host"); - ypxfr_exit(YPXFR_YPERR,&ypxfr_temp_map); + ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); } (void)(dbp->close)(dbp); @@ -537,11 +537,11 @@ the local domain name isn't set"); yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? "map has order 0" : ypxfrerr_string(yp_errno)); - ypxfr_exit(YPXFR_YPERR,&ypxfr_temp_map); + ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); } if (ypxfr_order != ypxfr_skew_check) - ypxfr_exit(YPXFR_SKEW,&ypxfr_temp_map); + ypxfr_exit(YPXFR_SKEW,ypxfr_temp_map); /* * Send a YPPROC_CLEAR to the local ypserv. @@ -555,7 +555,7 @@ the local domain name isn't set"); xdr_void, (void *)out)) != RPC_SUCCESS) { yp_error("failed to send 'clear' to local ypserv: %s", clnt_sperrno((enum clnt_stat) stat)); - ypxfr_exit(YPXFR_CLEAR, &ypxfr_temp_map); + ypxfr_exit(YPXFR_CLEAR, ypxfr_temp_map); } } diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c index ede4f56e632d..3c3328650afb 100644 --- a/libexec/ypxfr/ypxfr_misc.c +++ b/libexec/ypxfr/ypxfr_misc.c @@ -46,7 +46,7 @@ struct dom_binding {}; #include #include "ypxfr_extern.h" -char * +const char * ypxfrerr_string(ypxfrstat code) { switch (code) {