Comment

Comment by jeremycw

https://github.com/ir33k/gmi100/blob/master/gmi100.c#L27 definitely threw me for a loop until I realized it was a line saving trick. It would be more readable to save lines elsewhere by exploiting the comma operator instead of essentially cramming irrelevant statements into a conditional.

For example:

  addr.sin_family = AF_INET;
  addr.sin_port = htons(1965);
Could become:

  addr.sin_family = AF_INET, addr.sin_port = htons(1965);
parent jeremycw 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton