diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2014-01-13 23:14:19 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2014-01-13 23:14:19 +0000 |
commit | 5e0e874520d74912fef282f6c867f860c3581ad8 (patch) | |
tree | 12f50f797652f53ec7136dc8f054d0a9c646a1a7 /usr.bin | |
parent | 3438ce3a29d029b371c14375ae8bf82682019356 (diff) |
Callers of get_state() and sole_reduction() always store the result
as a short so make the return value match the type of the value we
are returning. From Michael W. Bombardieri
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/yacc/lr0.c | 6 | ||||
-rw-r--r-- | usr.bin/yacc/mkpar.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/yacc/lr0.c b/usr.bin/yacc/lr0.c index 6ac2e91998e..3640f55ab5b 100644 --- a/usr.bin/yacc/lr0.c +++ b/usr.bin/yacc/lr0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lr0.c,v 1.15 2014/01/08 22:36:37 millert Exp $ */ +/* $OpenBSD: lr0.c,v 1.16 2014/01/13 23:14:17 millert Exp $ */ /* $NetBSD: lr0.c,v 1.4 1996/03/19 03:21:35 jtc Exp $ */ /* @@ -44,7 +44,7 @@ core *first_state; shifts *first_shift; reductions *first_reduction; -int get_state(int); +short get_state(int); core *new_state(int); void allocate_itemsets(void); @@ -197,7 +197,7 @@ generate_states(void) -int +short get_state(int symbol) { int key; diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c index 5f4083423c3..a08f25a5d5d 100644 --- a/usr.bin/yacc/mkpar.c +++ b/usr.bin/yacc/mkpar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkpar.c,v 1.16 2014/01/08 21:40:25 millert Exp $ */ +/* $OpenBSD: mkpar.c,v 1.17 2014/01/13 23:14:18 millert Exp $ */ /* $NetBSD: mkpar.c,v 1.4 1996/03/19 03:21:39 jtc Exp $ */ /* @@ -54,7 +54,7 @@ extern action *get_shifts(); extern action *add_reductions(); extern action *add_reduce(); -int sole_reduction(int); +short sole_reduction(int); void free_action_row(action *); void find_final_state(void); @@ -338,10 +338,11 @@ total_conflicts(void) } -int +short sole_reduction(int stateno) { - int count, ruleno; + int count; + short ruleno; action *p; count = 0; |