summaryrefslogtreecommitdiffstats
path: root/rsyslog.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-10 08:45:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-10 08:45:07 +0200
commit3d87bbfa9c9c6d111861fcfa393c887b0c7ef99e (patch)
tree343011831a9a47306d4d1c332191b71370de8cf1 /rsyslog.h
parent38f875c582eacce25594daf0b41655f2ee677f24 (diff)
parent3a0060c6eb7ae71221a6d08248af2fb356202583 (diff)
downloadrsyslog-3d87bbfa9c9c6d111861fcfa393c887b0c7ef99e.tar.gz
rsyslog-3d87bbfa9c9c6d111861fcfa393c887b0c7ef99e.tar.xz
rsyslog-3d87bbfa9c9c6d111861fcfa393c887b0c7ef99e.zip
Merge branch 'v3-stable' into MAXHOSTNAMELEN
Conflicts: configure.ac
Diffstat (limited to 'rsyslog.h')
-rw-r--r--rsyslog.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/rsyslog.h b/rsyslog.h
index 93b5c149..60931ed7 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -190,6 +190,8 @@ typedef enum rsRetVal_ rsRetVal; /**< friendly type for global return value */
#define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
/* macro below is to be used if we need our own handling, eg for cleanup */
#define CHKiRet_Hdlr(code) if((iRet = code) != RS_RET_OK)
+/* macro below is to handle failing malloc/calloc/strdup... which we almost always handle in the same way... */
+#define CHKmalloc(operation) if((operation) == NULL) ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY)
/* macro below is used in conjunction with CHKiRet_Hdlr, else use ABORT_FINALIZE */
#define FINALIZE goto finalize_it;
#define DEFiRet BEGINfunc rsRetVal iRet = RS_RET_OK