mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
ext/snmp: no need to use a smart_string for error message (#19171)
This commit is contained in:
parent
5fdc02282f
commit
b48faee850
1 changed files with 6 additions and 9 deletions
|
@ -1038,21 +1038,18 @@ static bool snmp_session_set_auth_protocol(struct snmp_session *s, zend_string *
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
smart_string err = {0};
|
zend_value_error(
|
||||||
|
"Authentication protocol must be \"SHA\""
|
||||||
smart_string_appends(&err, "Authentication protocol must be \"SHA\"");
|
|
||||||
#ifdef HAVE_SNMP_SHA256
|
#ifdef HAVE_SNMP_SHA256
|
||||||
smart_string_appends(&err, " or \"SHA256\"");
|
" or \"SHA256\""
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SNMP_SHA512
|
#ifdef HAVE_SNMP_SHA512
|
||||||
smart_string_appends(&err, " or \"SHA512\"");
|
" or \"SHA512\""
|
||||||
#endif
|
#endif
|
||||||
#ifndef DISABLE_MD5
|
#ifndef DISABLE_MD5
|
||||||
smart_string_appends(&err, " or \"MD5\"");
|
" or \"MD5\""
|
||||||
#endif
|
#endif
|
||||||
smart_string_0(&err);
|
);
|
||||||
zend_value_error("%s", err.c);
|
|
||||||
smart_string_free(&err);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue