Skip to content

Commit

Permalink
tools: minor performance improvement
Browse files Browse the repository at this point in the history
PR-URL: #16125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
addaleax committed Oct 14, 2017
1 parent 695b307 commit 80bd2a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/genv8constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def out_define():
# 6-character margin, 2-characters + 1 space for each field
idx = 6 + i * 3;
octetstr = line[idx:idx+3]
if not numpattern.match(octetstr):
if curr_octet > octets:
break;

if curr_octet > octets:
if not numpattern.match(octetstr):
break;

curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8);
Expand Down

1 comment on commit 80bd2a2

@addaleax
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, messed up splitting the commits – the author here should be @243083df (thanks @lpinca for pointing that out)

Please sign in to comment.