Why have i++; i–; right after each other?

This was a bug. These lines together result in i being unchanged, so they shouldn’t have been there. The linked article that introduced nmap was published on September 1 1997. If you look at the SVN repository for nmap at https://svn.nmap.org/nmap, the initial revision checked in on February 10 1998 does not have those lines: … Read more