2 ms·
If not for the need to get and later free the Dir *b; , and print the message, this condition would get a lot simpler. I'd find it more readable to write
by JoshTriplett 14y ago
If not for the need to get and later free the
Dir *b;
, and print the message, this condition would get a lot simpler. I'd find it more readable to write a function
bool samefile(Dir *a, Dir *b)
, have it consist of a single-line return statement, and then have the caller just do if (samefile(a, b)) { ... }.