Skip to content

Commit

Permalink
simplify exception handler check in func_end
Browse files Browse the repository at this point in the history
There's no need to check if wraprec is not NULL - it is guaranteed to be not
NULL at this point.
  • Loading branch information
lavarou committed Apr 16, 2024
1 parent 12f8ce7 commit 5c7f58d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/php_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ static void nr_php_instrument_func_end(NR_EXECUTE_PROTO) {

wraprec = segment->wraprec;

if (wraprec && segment->is_exception_handler) {
if (segment->is_exception_handler) {
/*
* After running the exception handler segment, create an error from
* the exception it handled, and save the error in the transaction.
Expand Down

0 comments on commit 5c7f58d

Please sign in to comment.