diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-02-20 01:52:02 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-02-20 01:52:02 +0000 |
commit | ec96fc1e0da994d5a08e8aecd9c6faa88dfe81bf (patch) | |
tree | 08e8c28f8541db332ecccff11da73b54446b14d6 /usr.bin/tset/tset.c | |
parent | b8d16442565088a6feac23b6ff83fe0f8e97e143 (diff) |
Change hard coded numbers to sizeof(buf). Also change some
sizeof(buf) - 1 to sizeof(buf), since fgets takes the whole buffer size.
Based on diff from Charles Longeau <chl at tuxfamily dot org> long ago.
OK millert@.
Diffstat (limited to 'usr.bin/tset/tset.c')
-rw-r--r-- | usr.bin/tset/tset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c index 8d78d3c4594..f44bafa1882 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tset.c,v 1.28 2006/10/10 21:38:16 cloder Exp $ */ +/* $OpenBSD: tset.c,v 1.29 2007/02/20 01:52:01 ray Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -530,7 +530,7 @@ get_termcap_entry(char *userarg) char buffer[BUFSIZ]; char *s, *t, *d; - while (fgets(buffer, sizeof(buffer) - 1, fp) != NULL) { + while (fgets(buffer, sizeof(buffer), fp) != NULL) { for (s = buffer, t = d = 0; *s; s++) { if (isspace(CharOf(*s))) *s = '\0'; |