Skip to content

Commit aea2d18

Browse files
committed
Parameter check and whitespace cleanup.
1 parent ed6d354 commit aea2d18

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

systemd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ PHP_FUNCTION(sd_journal_send)
3434
int argc, len, i;
3535
char *val;
3636

37-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) {
38-
return NULL;
37+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) != SUCCESS) {
38+
return;
3939
}
4040

4141
// Allocate sufficient iovector space for the arguments.
@@ -47,11 +47,11 @@ PHP_FUNCTION(sd_journal_send)
4747

4848
// Iterate through the PHP arguments and fill the iovector.
4949
for (i = 0; i < ZEND_NUM_ARGS() TSRMLS_CC; ++i) {
50-
convert_to_string_ex(args[i]);
51-
val = Z_STRVAL_PP(args[i]);
52-
len = Z_STRLEN_PP(args[i]);
53-
iov[i].iov_base = val;
54-
iov[i].iov_len = len;
50+
convert_to_string_ex(args[i]);
51+
val = Z_STRVAL_PP(args[i]);
52+
len = Z_STRLEN_PP(args[i]);
53+
iov[i].iov_base = val;
54+
iov[i].iov_len = len;
5555
}
5656

5757
// Send the iovector to journald.

0 commit comments

Comments
 (0)