
In order to improve code density, it is widely accepted to initialize variables in the very first use, you can see in line 16 that you can just declare and initialize char *sockPath = argv[1]
and you can declare the struct in the line just before line 19.