summaryrefslogtreecommitdiff
path: root/usr/src/cmd/spell
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nexenta.com <none@none>2011-02-17 14:49:38 -0800
committerRoland Mainz <roland.mainz@nexenta.com <none@none>2011-02-17 14:49:38 -0800
commit461686c359e383739b8e0d23c68520a0e2e2c361 (patch)
tree7a694e1712e7364045ed094d4c8d005f145748c4 /usr/src/cmd/spell
parentcf705556833c77102da060256e3d97bd13f6f18a (diff)
downloadillumos-joyent-461686c359e383739b8e0d23c68520a0e2e2c361.tar.gz
702 tput calls gets()
703 hashmake calls gets() but should use fgets(). Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Olga Kryzhanoska <olga.kryzhanovska@gmail.com> Approved by: Garrett D'Amore <garrett@nexenta.com>
Diffstat (limited to 'usr/src/cmd/spell')
-rw-r--r--usr/src/cmd/spell/hashmake.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr/src/cmd/spell/hashmake.c b/usr/src/cmd/spell/hashmake.c
index 3b7d3f5356..844f205841 100644
--- a/usr/src/cmd/spell/hashmake.c
+++ b/usr/src/cmd/spell/hashmake.c
@@ -26,8 +26,7 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
+/* Copyright 2011 Nexenta Systems, Inc. All rights reserved. */
#include <stdlib.h>
#include <unistd.h>
@@ -51,7 +50,7 @@ main(int argc, char **argv)
(void) textdomain(TEXT_DOMAIN);
hashinit();
- while (gets(word)) {
+ while (fgets(word, sizeof (word), stdin)) {
(void) printf("%.*lo\n", (HASHWIDTH+2)/3, hash(word));
}
return (0);