From 20360221fb53e0bda3570ae2e3a89536620345c4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Jan 2009 15:27:23 -0800 Subject: [PATCH] Fix bug that could have caused infinite loop in ofp_print_actions(). Found by -Wextra noticing that len < 0 is always false. --- lib/ofp-print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 8dcc3bbc2..20574731b 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -448,7 +448,7 @@ ofp_print_actions(struct ds *string, const struct ofp_action_header *action, size_t actions_len) { uint8_t *p = (uint8_t *)action; - size_t len = 0; + int len = 0; ds_put_cstr(string, "actions="); while (actions_len > 0) { -- 2.43.0