summaryrefslogtreecommitdiff
path: root/usr.bin/tic/tic.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-12-28 05:54:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-12-28 05:54:45 +0000
commit89c5e070e133e0a3bc7f3d1fcaf00a40e33d9f8c (patch)
tree38b2ea8417724716e9a6145b39401202872564b4 /usr.bin/tic/tic.c
parent5b78d8b23e9c62e66196cafc9330d55f83e9bff2 (diff)
don't dump core when invoked with no args; pavel_roskin@geocities.com
Diffstat (limited to 'usr.bin/tic/tic.c')
-rw-r--r--usr.bin/tic/tic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tic/tic.c b/usr.bin/tic/tic.c
index 206fc9497df..c6ffccf71b8 100644
--- a/usr.bin/tic/tic.c
+++ b/usr.bin/tic/tic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tic.c,v 1.2 1998/11/03 21:59:53 millert Exp $ */
+/* $OpenBSD: tic.c,v 1.3 1998/12/28 05:54:44 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -57,7 +57,8 @@ static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrsw1] sour
static void cleanup(void)
{
- fclose(tmp_fp);
+ if (tmp_fp != 0)
+ fclose(tmp_fp);
if (to_remove != 0)
remove(to_remove);
}