From aea2d1845de3fc1f70db536d3c0e5bd9808ebe28 Mon Sep 17 00:00:00 2001 From: David Strauss Date: Thu, 6 Mar 2014 14:03:17 -0800 Subject: [PATCH] Parameter check and whitespace cleanup. --- systemd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/systemd.c b/systemd.c index e1d4cc9..9479556 100644 --- a/systemd.c +++ b/systemd.c @@ -34,8 +34,8 @@ PHP_FUNCTION(sd_journal_send) int argc, len, i; char *val; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) { - return NULL; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) != SUCCESS) { + return; } // Allocate sufficient iovector space for the arguments. @@ -47,11 +47,11 @@ PHP_FUNCTION(sd_journal_send) // Iterate through the PHP arguments and fill the iovector. for (i = 0; i < ZEND_NUM_ARGS() TSRMLS_CC; ++i) { - convert_to_string_ex(args[i]); - val = Z_STRVAL_PP(args[i]); - len = Z_STRLEN_PP(args[i]); - iov[i].iov_base = val; - iov[i].iov_len = len; + convert_to_string_ex(args[i]); + val = Z_STRVAL_PP(args[i]); + len = Z_STRLEN_PP(args[i]); + iov[i].iov_base = val; + iov[i].iov_len = len; } // Send the iovector to journald.