summaryrefslogtreecommitdiff
path: root/usr.bin/yacc/lalr.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-11 20:25:48 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-11 20:25:48 +0000
commitc74e5e6d7058757bcd7104fde08154dd93aee666 (patch)
treec319b8e6a237b7392b43b04d95e436ba56362cd0 /usr.bin/yacc/lalr.c
parentcb76330f1626a0c2bf7bb7a0405a3d8fab8362dd (diff)
Remove NULL-checks before free().
Diffstat (limited to 'usr.bin/yacc/lalr.c')
-rw-r--r--usr.bin/yacc/lalr.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c
index 909ef139e9a..42b88b4a76f 100644
--- a/usr.bin/yacc/lalr.c
+++ b/usr.bin/yacc/lalr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lalr.c,v 1.17 2014/05/17 15:19:17 chl Exp $ */
+/* $OpenBSD: lalr.c,v 1.18 2015/12/11 20:25:47 mmcc Exp $ */
/* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */
/*
@@ -338,10 +338,8 @@ initialize_F(void)
SETBIT(F, 0);
digraph(reads);
- for (i = 0; i < ngotos; i++) {
- if (reads[i])
- free(reads[i]);
- }
+ for (i = 0; i < ngotos; i++)
+ free(reads[i]);
free(reads);
free(edge);
@@ -414,8 +412,7 @@ build_relations(void)
new_includes = transpose(includes, ngotos);
for (i = 0; i < ngotos; i++)
- if (includes[i])
- free(includes[i]);
+ free(includes[i]);
free(includes);