summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-16 19:27:41 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-06-16 20:09:45 -0400
commit626e8d0a9b4830438276947d0c76d1fbf4c7884c (patch)
tree5cce0ff596a34a13e2c813c8a936eb693b56fcef /lib/json.c
parent8872626bb4b8f5d9d06ea2b5e513e5ecb6a541aa (diff)
lib: A small optimization for the hash iterate and walk functions
When we are iterating through the hash, keep count of how many we've called and if we have finished calling the hash->size iterator times, then short-circuit and stop looping over the entire array. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions