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:
e317e93
)
check sync_fp before calling fclose().
author
Edward Wang
<edward@ucbvax.Berkeley.EDU>
Wed, 2 Nov 1983 09:32:29 +0000
(
01:32
-0800)
committer
Edward Wang
<edward@ucbvax.Berkeley.EDU>
Wed, 2 Nov 1983 09:32:29 +0000
(
01:32
-0800)
SCCS-vsn: games/sail/sync.c 2.2
usr/src/games/sail/sync.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/games/sail/sync.c
b/usr/src/games/sail/sync.c
index
1095cd4
..
3cde4d1
100644
(file)
--- a/
usr/src/games/sail/sync.c
+++ b/
usr/src/games/sail/sync.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char *sccsid = "@(#)sync.c 2.
1 83/10/3
1";
+static char *sccsid = "@(#)sync.c 2.
2 83/11/0
1";
#endif
#include "externs.h"
#endif
#include "externs.h"
@@
-73,7
+73,8
@@
sync_open()
sync_close(remove)
char remove;
{
sync_close(remove)
char remove;
{
- (void) fclose(sync_fp);
+ if (sync_fp != 0)
+ (void) fclose(sync_fp);
if (remove)
(void) unlink(sync_file);
}
if (remove)
(void) unlink(sync_file);
}