URI: 
       tlib9: revert unintended changes to opentemp - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit e960e21be1b197cfde3a7601a2120a93aa309a12
   DIR parent 0a40aeedbfc4713f4d8f20031e00a494c647bc9e
  HTML Author: Russ Cox <rsc@swtch.com>
       Date:   Wed,  9 Jul 2008 11:53:31 -0400
       
       lib9: revert unintended changes to opentemp
       
       Diffstat:
         M src/lib9/opentemp.c                 |      16 +++++-----------
       
       1 file changed, 5 insertions(+), 11 deletions(-)
       ---
   DIR diff --git a/src/lib9/opentemp.c b/src/lib9/opentemp.c
       t@@ -2,20 +2,14 @@
        #include <libc.h>
        
        int
       -opentemp(char *template, int mode)
       +opentemp(char *template)
        {
       -        int fd, fd1;
       +        int fd;
        
                fd = mkstemp(template);
                if(fd < 0)
                        return -1;
       -        /* reopen for mode */
       -        fd1 = open(template, mode);
       -        if(fd1 < 0){
       -                close(fd);
       -                remove(template);
       -                return -1;
       -        }
       -        close(fd);
       -        return fd1;
       +        remove(template);
       +        return fd;
        }
       +