summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/mktemp.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-04-23 14:36:44 +0000
committeremaste <emaste@FreeBSD.org>2013-04-23 14:36:44 +0000
commited68431e9eb5f5d79436afe779c4564cc625c69e (patch)
treeeee3d4211d69ff36f950fb608985ae69d9c4c4e1 /lib/libc/stdio/mktemp.c
parent1f1bd98319ba57830e89bfdbf57da9dfa3da9084 (diff)
downloadFreeBSD-src-ed68431e9eb5f5d79436afe779c4564cc625c69e.zip
FreeBSD-src-ed68431e9eb5f5d79436afe779c4564cc625c69e.tar.gz
Convert libc/stdio from K&R to ANSI C
And add '__restrict' where it appeared in the header prototypes
Diffstat (limited to 'lib/libc/stdio/mktemp.c')
-rw-r--r--lib/libc/stdio/mktemp.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index 24f9a67..58783dd 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -53,9 +53,7 @@ static const unsigned char padchar[] =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
int
-mkstemps(path, slen)
- char *path;
- int slen;
+mkstemps(char *path, int slen)
{
int fd;
@@ -63,8 +61,7 @@ mkstemps(path, slen)
}
int
-mkstemp(path)
- char *path;
+mkstemp(char *path)
{
int fd;
@@ -72,15 +69,13 @@ mkstemp(path)
}
char *
-mkdtemp(path)
- char *path;
+mkdtemp(char *path)
{
return (_gettemp(path, (int *)NULL, 1, 0) ? path : (char *)NULL);
}
char *
-_mktemp(path)
- char *path;
+_mktemp(char *path)
{
return (_gettemp(path, (int *)NULL, 0, 0) ? path : (char *)NULL);
}
@@ -89,18 +84,13 @@ __warn_references(mktemp,
"warning: mktemp() possibly used unsafely; consider using mkstemp()");
char *
-mktemp(path)
- char *path;
+mktemp(char *path)
{
return (_mktemp(path));
}
static int
-_gettemp(path, doopen, domkdir, slen)
- char *path;
- int *doopen;
- int domkdir;
- int slen;
+_gettemp(char *path, int *doopen, int domkdir, int slen)
{
char *start, *trv, *suffp, *carryp;
char *pad;
OpenPOWER on IntegriCloud