summaryrefslogtreecommitdiff
path: root/ext/standard/syslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/syslog.c')
-rw-r--r--ext/standard/syslog.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index 38605eb03d..91162d303d 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -138,10 +138,12 @@ PHP_FUNCTION(openlog)
zend_long option, facility;
size_t ident_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll", &ident,
- &ident_len, &option, &facility) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(3, 3)
+ Z_PARAM_STRING(ident, ident_len)
+ Z_PARAM_LONG(option)
+ Z_PARAM_LONG(facility)
+ ZEND_PARSE_PARAMETERS_END();
+
if (BG(syslog_device)) {
free(BG(syslog_device));
}
@@ -179,10 +181,10 @@ PHP_FUNCTION(syslog)
char *message;
size_t message_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &priority,
- &message, &message_len) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_LONG(priority)
+ Z_PARAM_STRING(message, message_len)
+ ZEND_PARSE_PARAMETERS_END();
php_syslog(priority, "%s", message);
RETURN_TRUE;