From 89c5e070e133e0a3bc7f3d1fcaf00a40e33d9f8c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 28 Dec 1998 05:54:45 +0000 Subject: don't dump core when invoked with no args; pavel_roskin@geocities.com --- usr.bin/tic/tic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/tic/tic.c') 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); } -- cgit v1.2.3