aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/yp_mkdb
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 13:30:31 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-02-06 13:30:31 +0000
commited4d1c46a27632aa553e7c24c969262bfc2d5c97 (patch)
treed44f2702502c982570c85130c91c845a83ea8052 /usr.sbin/yp_mkdb
parent8bf216d4a39b268cd561eb5e3a90ba41ef5e733f (diff)
downloadsrc-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.tar.gz
src-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.zip
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
Notes
Notes: svn path=/head/; revision=90297
Diffstat (limited to 'usr.sbin/yp_mkdb')
-rw-r--r--usr.sbin/yp_mkdb/yp_mkdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c
index a5fed00631db..6f0d71b0feda 100644
--- a/usr.sbin/yp_mkdb/yp_mkdb.c
+++ b/usr.sbin/yp_mkdb/yp_mkdb.c
@@ -88,7 +88,7 @@ static void unwind(map)
err(1, "open_db(%s) failed", map);
key.data = NULL;
- while(yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE)
+ while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE)
printf("%.*s %.*s\n", key.size,key.data,data.size,data.data);
(void)(dbp->close)(dbp);
@@ -119,7 +119,7 @@ int main (argc, argv)
char hname[MAXHOSTNAMELEN + 2];
while ((ch = getopt(argc, argv, "uhcbsfd:i:o:m:")) != -1) {
- switch(ch) {
+ switch (ch) {
case 'f':
filter_plusminus++;
break;
@@ -250,7 +250,7 @@ int main (argc, argv)
yp_put_record(dbp, &key, &data, 0);
}
- while(fgets((char *)&buf, sizeof(buf), ifp)) {
+ while (fgets((char *)&buf, sizeof(buf), ifp)) {
char *sep = NULL;
int rval;
@@ -259,7 +259,7 @@ int main (argc, argv)
*sep = '\0';
/* handle backslash line continuations */
- while(buf[strlen(buf) - 1] == '\\') {
+ while (buf[strlen(buf) - 1] == '\\') {
fgets((char *)&buf[strlen(buf) - 1],
sizeof(buf) - strlen(buf), ifp);
if ((sep = strchr(buf, '\n')))
@@ -312,7 +312,7 @@ int main (argc, argv)
data.size = strlen(datbuf);
if ((rval = yp_put_record(dbp, &key, &data, 0)) != YP_TRUE) {
- switch(rval) {
+ switch (rval) {
case YP_FALSE:
warnx("duplicate key '%s' - skipping", keybuf);
break;