Skip to content

Commit

Permalink
Parameter check and whitespace cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstrauss committed Mar 6, 2014
1 parent ed6d354 commit aea2d18
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit aea2d18

Please sign in to comment.