Re: [PATCH] Btrfs: add support for asserts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 	#ifdef BTRFS_ASSERT
> > 	#define btrfs_assert(cond)  BUG_ON(!(cond))
> > 	#else
> > 	#define btrfs_assert(cond)  do { if (cond) ; } while (0)
> > 	#endif
> 
> I think the only downside is that the BUG_ON() won't print the
> conditional that failed, IIRC.

Sure, if you wanted to go the heavier informative route.  I might also
add format and args in that case.

- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux