summaryrefslogtreecommitdiffstats
path: root/libexec/ypxfr
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
committerdes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
commit0f2cb9b020b907000a28323fc57a82fdb7d6626d (patch)
treed44f2702502c982570c85130c91c845a83ea8052 /libexec/ypxfr
parent0e1bb965cc26648289a6a22baf0ad5ef4891edb4 (diff)
downloadFreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.zip
FreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.tar.gz
Apply the following mechanical transformations in preparation for
ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week
Diffstat (limited to 'libexec/ypxfr')
-rw-r--r--libexec/ypxfr/yp_dbwrite.c4
-rw-r--r--libexec/ypxfr/ypxfr_extern.h26
-rw-r--r--libexec/ypxfr/ypxfr_getmap.c2
-rw-r--r--libexec/ypxfr/ypxfr_main.c6
-rw-r--r--libexec/ypxfr/ypxfr_misc.c4
-rw-r--r--libexec/ypxfr/ypxfrd_getmap.c4
6 files changed, 23 insertions, 23 deletions
diff --git a/libexec/ypxfr/yp_dbwrite.c b/libexec/ypxfr/yp_dbwrite.c
index bd45c43..4715d7f 100644
--- a/libexec/ypxfr/yp_dbwrite.c
+++ b/libexec/ypxfr/yp_dbwrite.c
@@ -75,7 +75,7 @@ DB *yp_open_db_rw(domain, map, flags)
dbp = dbopen(buf,flags ? flags : FLAGS,PERM_SECURE,DB_HASH,&openinfo);
if (dbp == NULL) {
- switch(errno) {
+ switch (errno) {
case ENOENT:
yp_errno = YP_NOMAP;
break;
@@ -101,7 +101,7 @@ int yp_put_record(dbp,key,data,allow_overwrite)
if ((rval = (dbp->put)(dbp,key,data, allow_overwrite ? 0 :
R_NOOVERWRITE))) {
- switch(rval) {
+ switch (rval) {
case 1:
return(YP_FALSE);
break;
diff --git a/libexec/ypxfr/ypxfr_extern.h b/libexec/ypxfr/ypxfr_extern.h
index 045f496..f5feedf 100644
--- a/libexec/ypxfr/ypxfr_extern.h
+++ b/libexec/ypxfr/ypxfr_extern.h
@@ -47,16 +47,16 @@ extern BTREEINFO openinfo_b;
extern char *yp_dir;
extern int debug;
extern enum ypstat yp_errno;
-extern void yp_error __P(( const char *, ... ));
-extern int _yp_check __P(( char ** ));
-extern char *ypxfrerr_string __P(( ypxfrstat ));
-extern DB *yp_open_db_rw __P(( const char *, const char *, const int));
-extern void yp_init_dbs __P(( void ));
-extern int yp_put_record __P(( DB *, DBT *, DBT * , int ));
-extern int yp_get_record __P(( const char *, const char *, const DBT *, DBT *, int ));
-extern int ypxfr_get_map __P(( char *, char *, char *, int (*)() ));
-extern char *ypxfr_get_master __P(( char *, char *, char *, const int ));
-extern unsigned long ypxfr_get_order __P(( char *, char *, char *, const int ));
-extern int ypxfr_match __P(( char *, char *, char *, char *, unsigned long ));
-extern char *ypxfxerr_string __P(( ypxfrstat ));
-extern int ypxfrd_get_map __P(( char *, char *, char *, char *));
+extern void yp_error(const char *, ...);
+extern int _yp_check(char **);
+extern 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);
+extern int yp_get_record(const char *, const char *, const DBT *, DBT *, int);
+extern int ypxfr_get_map(char *, char *, char *, int (*)());
+extern char *ypxfr_get_master(char *, char *, char *, const int);
+extern unsigned long ypxfr_get_order(char *, char *, char *, const int);
+extern int ypxfr_match(char *, char *, char *, char *, unsigned long);
+extern char *ypxfxerr_string(ypxfrstat);
+extern int ypxfrd_get_map(char *, char *, char *, char *);
diff --git a/libexec/ypxfr/ypxfr_getmap.c b/libexec/ypxfr/ypxfr_getmap.c
index 31a0e58..b7ec9f2 100644
--- a/libexec/ypxfr/ypxfr_getmap.c
+++ b/libexec/ypxfr/ypxfr_getmap.c
@@ -43,7 +43,7 @@ static const char rcsid[] =
#include <rpcsvc/yp.h>
#include "ypxfr_extern.h"
-extern bool_t xdr_ypresp_all_seq __P(( XDR *, unsigned long * ));
+extern bool_t xdr_ypresp_all_seq(XDR *, unsigned long *);
int (*ypresp_allfn)();
void *ypresp_data;
diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c
index a4ad1a0..24d9d4a 100644
--- a/libexec/ypxfr/ypxfr_main.c
+++ b/libexec/ypxfr/ypxfr_main.c
@@ -195,7 +195,7 @@ main(argc,argv)
while ((ch = getopt(argc, argv, "fcd:h:s:p:C:")) != -1) {
int my_optind;
- switch(ch) {
+ switch (ch) {
case 'f':
ypxfr_force++;
ypxfr_args++;
@@ -381,13 +381,13 @@ the local domain name isn't set");
key.data = "YP_LAST_MODIFIED";
key.size = sizeof("YP_LAST_MODIFIED") - 1;
-
+
/* The order number is immaterial when the 'force' flag is set. */
if (!ypxfr_force) {
int ignore = 0;
if (yp_get_record(ypxfr_dest_domain,ypxfr_mapname,&key,&data,1) != YP_TRUE) {
- switch(yp_errno) {
+ switch (yp_errno) {
case YP_NOKEY:
ypxfr_exit(YPXFR_FORCE,NULL);
break;
diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c
index 5371ce0..0682def 100644
--- a/libexec/ypxfr/ypxfr_misc.c
+++ b/libexec/ypxfr/ypxfr_misc.c
@@ -49,7 +49,7 @@ struct dom_binding {};
char *ypxfrerr_string(code)
ypxfrstat code;
{
- switch(code) {
+ switch (code) {
case YPXFR_SUCC:
return ("Map successfully transferred");
break;
@@ -194,7 +194,7 @@ failed"));
return((char *)&mastername);
}
}
-
+
unsigned long ypxfr_get_order(domain, map, source, yplib)
char *domain;
char *map;
diff --git a/libexec/ypxfr/ypxfrd_getmap.c b/libexec/ypxfr/ypxfrd_getmap.c
index 72555a3..5d57c84 100644
--- a/libexec/ypxfr/ypxfrd_getmap.c
+++ b/libexec/ypxfr/ypxfrd_getmap.c
@@ -53,7 +53,7 @@ int fp = 0;
static bool_t xdr_my_xfr(register XDR *xdrs, xfr *objp)
{
- while(1) {
+ while (1) {
if (!xdr_xfr(xdrs, objp))
return(FALSE);
if (objp->ok == TRUE) {
@@ -65,7 +65,7 @@ static bool_t xdr_my_xfr(register XDR *xdrs, xfr *objp)
}
xdr_free(xdr_xfr, (char *)objp);
if (objp->ok == FALSE) {
- switch(objp->xfr_u.xfrstat) {
+ switch (objp->xfr_u.xfrstat) {
case(XFR_DONE):
return(TRUE);
break;
OpenPOWER on IntegriCloud