Marco Costalba wrote: > >> >+ if (!user ^ !group) > >> >+ die("either set both user and group or none of them"); > > BTW the following (very ugly) works. > > if ((int)user ^ (int)group) No it doesn't. Besides being a dangerous cast (no guarantee that a pointer will fit in an "int") your code is basically just a fancy way of saying if (user != group) Which is definitely NOT what is intended. "user" and "group" are pointers -- unless they're both NULL we expect them to have different values. The original code is equivalent to: if ((user == NULL) != (group == NULL)) which is what is actually intended. -Mitch - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html