summaryrefslogtreecommitdiffstats
path: root/rsyslog.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-11 10:50:47 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-11 10:50:47 +0200
commit44de250eca8568c775e27bd052752c884a4c2555 (patch)
tree3b1af9ed481e378ad9d03030e0e5f891519afd72 /rsyslog.h
parent9584c81df387adcdcd7b84078eda48092049101d (diff)
parent8fae8b6d86728e4786d1fde82006ac64aee0da63 (diff)
downloadrsyslog-44de250eca8568c775e27bd052752c884a4c2555.tar.gz
rsyslog-44de250eca8568c775e27bd052752c884a4c2555.tar.xz
rsyslog-44de250eca8568c775e27bd052752c884a4c2555.zip
Merge branch 'v3-stable' into beta
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 9fe162d5..a80d43db 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -186,6 +186,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