projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
109f044
)
add some paranoia -- fo can be null if errors occur
author
Sam Leffler
<sam@ucbvax.Berkeley.EDU>
Thu, 1 Oct 1987 08:19:40 +0000
(
00:19
-0800)
committer
Sam Leffler
<sam@ucbvax.Berkeley.EDU>
Thu, 1 Oct 1987 08:19:40 +0000
(
00:19
-0800)
SCCS-vsn: old/refer/refer/refer7.c 4.4
usr/src/old/refer/refer/refer7.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/old/refer/refer/refer7.c
b/usr/src/old/refer/refer/refer7.c
index
c285da3
..
858e7e3
100644
(file)
--- a/
usr/src/old/refer/refer/refer7.c
+++ b/
usr/src/old/refer/refer/refer7.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char *sccsid = "@(#)refer7.c 4.
3
(Berkeley) %G%";
+static char *sccsid = "@(#)refer7.c 4.
4
(Berkeley) %G%";
#endif
#include "refer..c"
#endif
#include "refer..c"
@@
-32,8
+32,10
@@
dumpold()
if (!endpush)
return;
if (!endpush)
return;
- fclose(fo);
- fo = NULL;
+ if (fo != NULL) {
+ fclose(fo);
+ fo = NULL;
+ }
if (sort) {
char comm[100];
sprintf(comm, "sort -f %s -o %s", tfile, tfile);
if (sort) {
char comm[100];
sprintf(comm, "sort -f %s -o %s", tfile, tfile);