aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-01-31 06:09:06 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-01-31 06:09:06 +0000
commitc70d8528fccd50a8af1843e6c8e0da43f56f1f35 (patch)
tree1f6ac62e48f81a9971fe43f5ca47d7c2baca6be0
parent42a5271a91208b49b2440bcd5a6367e6bc4f00e4 (diff)
downloadfetchmail-c70d8528fccd50a8af1843e6c8e0da43f56f1f35.tar.gz
fetchmail-c70d8528fccd50a8af1843e6c8e0da43f56f1f35.tar.bz2
fetchmail-c70d8528fccd50a8af1843e6c8e0da43f56f1f35.zip
Label save closes.
svn path=/trunk/; revision=2723
-rw-r--r--daemon.c4
-rw-r--r--fetchmail.c4
-rw-r--r--getpass.c2
-rw-r--r--interface.c4
-rw-r--r--rcfile_y.y2
-rw-r--r--rpa.c2
-rw-r--r--uid.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/daemon.c b/daemon.c
index 08366bf1..c588ae47 100644
--- a/daemon.c
+++ b/daemon.c
@@ -135,7 +135,7 @@ daemonize (const char *logfile, void (*termhook)(int))
/* lose controlling tty */
if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
ioctl(fd, TIOCNOTTY, (char *) 0);
- close(fd);
+ close(fd); /* not checking should be safe, there were no writes */
}
#else /* SVR3 and older */
/* change process group */
@@ -165,7 +165,7 @@ nottyDetach:
for (fd = 19; fd >= 0; fd--)
#endif
{
- close(fd);
+ close(fd); /* not checking this should be safe, no writes */
}
/* Reopen stdin descriptor on /dev/null */
diff --git a/fetchmail.c b/fetchmail.c
index 1febf8ce..bbd6bfab 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -413,7 +413,7 @@ int main(int argc, char **argv)
bkgd = FALSE;
unlink(lockfile);
}
- fclose(lockfp);
+ fclose(lockfp); /* not checking should be safe, file mode was "r" */
}
/* if no mail servers listed and nothing in background, we're done */
@@ -582,7 +582,7 @@ int main(int argc, char **argv)
sprintf(tmpbuf," %d", run.poll_interval);
write(st, tmpbuf, strlen(tmpbuf));
}
- close(st);
+ close(st); /* should be safe, previous write was atomic */
lock_acquired = TRUE;
}
diff --git a/getpass.c b/getpass.c
index e54adcad..8ec86a74 100644
--- a/getpass.c
+++ b/getpass.c
@@ -131,7 +131,7 @@ char *prompt;
signal(SIGINT, sig);
}
if (fi != stdin)
- fclose(fi);
+ fclose(fi); /* not checking should be safe, file mode was "r" */
return(pbuf);
#endif /* !(defined(HAVE_TCSETATTR) || ... */
diff --git a/interface.c b/interface.c
index f1958cdd..6ddbbbbf 100644
--- a/interface.c
+++ b/interface.c
@@ -174,9 +174,9 @@ static int get_ifinfo(const char *ifname, ifinfo_t *ifinfo)
*sp = '/';
}
if (socket_fd >= 0)
- close(socket_fd);
+ close(socket_fd); /* not checking should be safe, mode was "r" */
if (stats_file)
- fclose(stats_file);
+ fclose(stats_file); /* not checking should be safe, mode was "r" */
return(result);
}
diff --git a/rcfile_y.y b/rcfile_y.y
index 525a38d5..554aaaa0 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -451,7 +451,7 @@ int prc_parse_file (const char *pathname, const flag securecheck)
yyparse(); /* parse entire file */
- fclose(yyin);
+ fclose(yyin); /* not checking this should be safe, file mode was r */
if (prc_errflag)
return(PS_SYNTAX);
diff --git a/rpa.c b/rpa.c
index 7e9dde6a..f05c4072 100644
--- a/rpa.c
+++ b/rpa.c
@@ -723,7 +723,7 @@ int len;
buf[i] = devrandom ? fgetc(devrandom) : random();
if (devrandom)
- fclose(devrandom);
+ fclose(devrandom); /* should be safe, file mode was "r" */
if (outlevel >= O_DEBUG)
{
diff --git a/uid.c b/uid.c
index 8b956fc1..8b6777b6 100644
--- a/uid.c
+++ b/uid.c
@@ -164,7 +164,7 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile)
}
}
}
- fclose(tmpfp);
+ fclose(tmpfp); /* not checking should be safe, mode was "r" */
}
if (outlevel >= O_DEBUG)