On Jul 27 2007 10:59, Al Viro wrote:But the conditional checking for a pointer and a boolean is the same; 0 == NULL == 'false' and the rest is valid/'true'. So IMHO it is a cleaner way to write it. But then again, some people like to abuse the '!' on "regular" variables.
On Fri, Jul 27, 2007 at 11:44:07AM +0200, Yoann Padioleau wrote:
buf = alloc_safe_buffer(device_info, ptr, size, dir);if (!buf)
- if (buf == 0) {
+ if (buf == NULL) {
surely...
Makes it look like it's used as a bool.