Looks weird. Since when is 0 returned for success in C code?