Use literal instead of computed value in token lookup

This commit is contained in:
Tatsuhiro Tsujikawa
2015-03-21 22:57:19 +09:00
parent ef913bc929
commit 6893608ae2
4 changed files with 23 additions and 23 deletions

View File

@@ -77,7 +77,7 @@ int lookup_token(const uint8_t *name, size_t namelen) {
print '''\
case {}:'''.format(size)
print '''\
switch (name[namelen - 1]) {'''
switch (name[{}]) {{'''.format(size - 1)
for c in sorted(ents.keys()):
headers = sorted(ents[c])
print '''\