http2: rename counter in `mapToHeaders` inner loop · nodejs/node@e54eb46 · GitHub
Skip to content

Commit e54eb46

Browse files
mkrawczuktargos
authored andcommitted
http2: rename counter in mapToHeaders inner loop
This change is to prevent potential bugs - e.g., someone might automatically use the variable `k` instead of `key`, that is used in vicinity of this loop. Also changed postincrement to preincrement in iteration steps. It is probably done by the optimizer anyway, but otherwise it will save an opcode each iteration. And it is a good practice. PR-URL: #32012 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 776905e commit e54eb46

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/internal/http2/util.js

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)