summaryrefslogtreecommitdiff
path: root/src/compat/nullpo.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-26 18:18:01 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-26 20:45:30 -0700
commitec21450522e3c2124f3510eef5cfd88420483248 (patch)
tree2d3dbd342dccd34bc3545ae3ab7902042abe6815 /src/compat/nullpo.hpp
parent296629e067563e82b4a08b2a785d1c2f13b5a285 (diff)
downloadtmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.gz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.bz2
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.xz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.zip
Low hanging fruit
Diffstat (limited to 'src/compat/nullpo.hpp')
-rw-r--r--src/compat/nullpo.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compat/nullpo.hpp b/src/compat/nullpo.hpp
index d6e39a5..5de8ab6 100644
--- a/src/compat/nullpo.hpp
+++ b/src/compat/nullpo.hpp
@@ -26,7 +26,8 @@
//# define BUG_FREE
/// All functions print to standard error (was: standard output)
-/// nullpo_ret(cond) - return 0 if given pointer is NULL
+/// nullpo_retn(cond) - return nullptr if given pointer is nullptr
+/// nullpo_retz(cond) - return 0 if given pointer is nullptr
/// nullpo_retv(cond) - just return (function returns void)
/// nullpo_retr(rv, cond) - return given value instead
@@ -38,7 +39,8 @@
# define nullpo_retr(ret, t) /*t*/
# endif // BUG_FREE
-# define nullpo_ret(t) nullpo_retr(0, t)
+# define nullpo_retn(t) nullpo_retr(nullptr, t)
+# define nullpo_retz(t) nullpo_retr(0, t)
# define nullpo_retv(t) nullpo_retr(, t)
# include "fwd.hpp"