summaryrefslogtreecommitdiffstats
path: root/src/tests/resolve
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/tests/resolve
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/resolve')
-rw-r--r--src/tests/resolve/addrinfo-test.c6
-rw-r--r--src/tests/resolve/resolve.c26
2 files changed, 15 insertions, 17 deletions
diff --git a/src/tests/resolve/addrinfo-test.c b/src/tests/resolve/addrinfo-test.c
index dff8df1ddd..f011b6ad46 100644
--- a/src/tests/resolve/addrinfo-test.c
+++ b/src/tests/resolve/addrinfo-test.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* A simple program to test the functionality of the getaddrinfo function.
*
@@ -73,7 +73,7 @@ static const char *protoname (int p) {
snprintf(buf, sizeof(buf), " %-2d", p);
return buf;
-}
+}
static const char *socktypename (int t) {
static char buf[30];
diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c
index 0be8244a23..09be1486eb 100644
--- a/src/tests/resolve/resolve.c
+++ b/src/tests/resolve/resolve.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,14 +22,14 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* A simple program to test the functionality of the resolver library.
- * It simply will try to get the IP address of the host, and then look
+ * It simply will try to get the IP address of the host, and then look
* up the name from the address. If the resulting name does not contain the
* domain name, then the resolve library is broken.
*
- * Warning: It is possible to fool this program into thinking everything is
+ * Warning: It is possible to fool this program into thinking everything is
* alright byt a clever use of /etc/hosts - but this is better than nothing.
*
* Usage:
@@ -88,7 +88,7 @@ main(argc, argv)
if ((strcmp(*argv, "--quiet") == 0) ||
(strcmp(*argv, "-q") == 0)) {
quiet++;
- } else
+ } else
break;
argc--; argv++;
}
@@ -101,13 +101,13 @@ main(argc, argv)
exit(1);
}
}
-
+
myname[MAXHOSTNAMELEN] = '\0'; /* for safety */
-
+
/* Look up the address... */
if (!quiet)
printf("Hostname: %s\n", myname);
-
+
/* Set the hosts db to close each time - effectively rewinding file */
sethostent(0);
@@ -118,11 +118,11 @@ main(argc, argv)
myname);
exit(2);
}
-
+
ptr = host->h_addr_list[0];
#define UC(a) (((int)a)&0xff)
if (!quiet)
- printf("Host address: %d.%d.%d.%d\n",
+ printf("Host address: %d.%d.%d.%d\n",
UC(ptr[0]), UC(ptr[1]), UC(ptr[2]), UC(ptr[3]));
memcpy(&addrcopy.s_addr, ptr, 4);
@@ -132,12 +132,12 @@ main(argc, argv)
fprintf(stderr, "Error looking up IP address - fatal\n");
exit(2);
}
-
+
if (quiet)
printf("%s\n", host->h_name);
else
printf("FQDN: %s\n", host->h_name);
-
+
/*
* The host name must have at least one '.' in the name, and
* if there is only one '.', it must not be at the end of the
@@ -168,5 +168,3 @@ main(argc, argv)
exit(0);
}
-
-