Skip to content

Commit 7fd363e

Browse files
lavarouzsistla
andauthored
fix initialization of zend_result variable
Use correct value for failure when initializing a variable of zend_result type. Co-authored-by: Amber Sistla <[email protected]>
1 parent b4d8a8f commit 7fd363e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/lib_composer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static bool nr_execute_handle_autoload_composer_is_initialized() {
3535
static int nr_execute_handle_autoload_composer_init(const char* vendor_path) {
3636
char* code = NULL;
3737
zval retval;
38-
int result = -1;
38+
int result = FAILURE;
3939

4040
if (nr_execute_handle_autoload_composer_is_initialized()) {
4141
nrl_verbosedebug(NRL_INSTRUMENT, "%s: already initialized", __func__);
@@ -72,7 +72,7 @@ static void nr_execute_handle_autoload_composer_get_packages_information(
7272
const char* vendor_path) {
7373
zval retval; // This is used as a return value for zend_eval_string.
7474
// It will only be set if the result of the eval is SUCCESS.
75-
int result = -1;
75+
int result = FAILURE;
7676

7777
// nrunlikely because this should alredy be ensured by the caller
7878
if (nrunlikely(!NRINI(vulnerability_management_package_detection_enabled))) {

0 commit comments

Comments
 (0)