]> granicus.if.org Git - fcron/commitdiff
removed close(tmp_fd) (fd already closed by fclose() since it was fdopen()ed)
authorthib <thib>
Tue, 23 Jan 2007 22:46:21 +0000 (22:46 +0000)
committerthib <thib>
Tue, 23 Jan 2007 22:46:21 +0000 (22:46 +0000)
fcrontab.c

index 0b982b55cc1de7b13a490464455e09944b0712c4..69460e75cc307a2f26897d8895c87257c972944a 100644 (file)
@@ -21,7 +21,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fcrontab.c,v 1.71 2006-06-05 21:20:41 thib Exp $ */
+ /* $Id: fcrontab.c,v 1.72 2007-01-23 22:46:21 thib Exp $ */
 
 /* 
  * The goal of this program is simple : giving a user interface to fcron
@@ -46,7 +46,7 @@
 #include "temp_file.h"
 #include "read_string.h"
 
-char rcs_info[] = "$Id: fcrontab.c,v 1.71 2006-06-05 21:20:41 thib Exp $";
+char rcs_info[] = "$Id: fcrontab.c,v 1.72 2007-01-23 22:46:21 thib Exp $";
 
 void info(void);
 void usage(void);
@@ -651,8 +651,8 @@ install_stdin(void)
     while ( (c = getc(stdin)) != EOF )
        putc(c, tmp_file);
 
+    /* the following closes tmp_fd as well because it was fdopen()ed: */
     fclose(tmp_file);
-    close(tmp_fd);
 
     if ( make_file(tmp_str) == ERR )
        goto exiterr;