|
|
|
|
|
by jeremycw
1063 days ago
|
|
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);
|
|
Thanks for suggestion. I will go through code again to see if I can save more space with normal code.
Actually that was my workflow. Each time I managed to write something in simpler way I reverted few tricks.