]> andersk Git - gssapi-openssh.git/blobdiff - openssh/openbsd-compat/mktemp.c
declare ssh_gssapi_krb5_updatecreds() before reference
[gssapi-openssh.git] / openssh / openbsd-compat / mktemp.c
index c951050c04021e1d3f1d0bf7e746a89035a0b843..9ed1bc80f4eae35d7f50066368d9d3b5a80dff77 100644 (file)
 
 #include "includes.h"
 
-#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
+#ifndef HAVE_MKDTEMP
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mktemp.c,v 1.16 2002/05/27 18:20:45 millert Exp $";
+static char rcsid[] = "$OpenBSD: mktemp.c,v 1.13 1998/06/30 23:03:13 deraadt Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef HAVE_CYGWIN
@@ -84,8 +84,7 @@ _gettemp(path, doopen, domkdir, slen)
 {
        register char *start, *trv, *suffp;
        struct stat sbuf;
-       int rval;
-       pid_t pid;
+       int pid, rval;
 
        if (doopen && domkdir) {
                errno = EINVAL;
@@ -102,11 +101,11 @@ _gettemp(path, doopen, domkdir, slen)
                return (0);
        }
        pid = getpid();
-       while (trv >= path && *trv == 'X' && pid != 0) {
+       while (*trv == 'X' && pid != 0) {
                *trv-- = (pid % 10) + '0';
                pid /= 10;
        }
-       while (trv >= path && *trv == 'X') {
+       while (*trv == 'X') {
                char c;
 
                pid = (arc4random() & 0xffff) % (26+26);
@@ -181,4 +180,4 @@ _gettemp(path, doopen, domkdir, slen)
        /*NOTREACHED*/
 }
 
-#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
+#endif /* !HAVE_MKDTEMP */
This page took 0.055694 seconds and 4 git commands to generate.