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 authored and targos committed Oct 18, 2017
1 parent a4bc6ff commit f89cc5d
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

0 comments on commit f89cc5d

Please sign in to comment.