summaryrefslogtreecommitdiffstats
path: root/usr.bin/chkey
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-07-28 15:02:24 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-07-28 15:02:24 +0000
commitc86f1a950aeaaedeaeca52ab4e77ca47169e6a5f (patch)
tree8580d60854ccb1ef458628892b8c2361f0b04ca9 /usr.bin/chkey
parentfe8579aa8fb4bc0fc7477e2b856e883cc60171b9 (diff)
downloadFreeBSD-src-c86f1a950aeaaedeaeca52ab4e77ca47169e6a5f.zip
FreeBSD-src-c86f1a950aeaaedeaeca52ab4e77ca47169e6a5f.tar.gz
ANSIify function definitions to avoid some warnings.
Include stdlib.h for exit.
Diffstat (limited to 'usr.bin/chkey')
-rw-r--r--usr.bin/chkey/chkey.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/usr.bin/chkey/chkey.c b/usr.bin/chkey/chkey.c
index 06875ce..c65fb05 100644
--- a/usr.bin/chkey/chkey.c
+++ b/usr.bin/chkey/chkey.c
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <sys/fcntl.h>
#include <pwd.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -77,9 +78,7 @@ static void usage(char *);
extern int yp_update(char *, char *, int, char *, size_t, char *, size_t);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
char name[MAXNETNAMELEN+1];
char public[HEXKEYBYTES + 1];
@@ -241,8 +240,7 @@ main(argc, argv)
}
static void
-usage(name)
- char *name;
+usage(char *name)
{
(void)fprintf(stderr, "usage: %s [-f]\n", name);
exit(1);
@@ -254,10 +252,7 @@ usage(name)
* Set the entry in the public key file
*/
int
-setpublicmap(name, public, secret)
- char *name;
- char *public;
- char *secret;
+setpublicmap(char *name, char *public, char *secret)
{
char pkent[1024];
@@ -273,8 +268,7 @@ setpublicmap(name, public, secret)
#ifdef YPPASSWD
struct passwd *
-ypgetpwuid(uid)
- uid_t uid;
+ypgetpwuid(uid_t uid)
{
char uidstr[10];
char *val;
OpenPOWER on IntegriCloud