os_result os_signalHandlerNew( void) { os_signalHandler _this; os_result result = os_resultFail; #if !defined INTEGRITY && !defined VXWORKS_RTP _this = os_malloc(sizeof(*_this)); if (_this == NULL) { OS_REPORT(OS_ERROR, "os_signalHandlerNew", 0, "os_malloc(%"PA_PRIuSIZE") failed.", sizeof(*_this)); goto err_malloc; } signalHandlerObj = _this; if((result = os_signalHandlerInit(_this)) != os_resultSuccess){ goto err_init; } #endif return result; err_init: signalHandlerObj = NULL; os_free(_this); err_malloc: return os_resultFail; }
os_result os_signalHandlerNew( void) { os_signalHandler _this = NULL; os_result result = os_resultFail; #if !defined INTEGRITY && !defined VXWORKS_RTP _this = (os_signalHandler)os_malloc(sizeof(struct os_signalHandler_s)); if (_this != NULL) { signalHandlerObj = _this; result = os_signalHandlerInit(_this); } else { OS_REPORT_1(OS_ERROR, "os_signalHandlerNew", 0, "os_malloc(%d) failed.", sizeof(struct os_signalHandler_s)); } #endif return result; }