Skip to content

Commit

Permalink
Fix appsec lint (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana authored Jan 8, 2025
1 parent 8d0cf27 commit 55377fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions appsec/src/extension/commands_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ static dd_result _dd_command_exec(dd_conn *nonnull conn,

// automatic cleanup of imsg on error branches
// set to NULL before calling _imsg_destroy
// NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores)
__attribute__((cleanup(_imsg_cleanup))) dd_imsg *nullable destroy_imsg =
&imsg;

Expand Down
3 changes: 2 additions & 1 deletion appsec/src/extension/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ dd_result dd_conn_sendv(dd_conn *nonnull conn, zend_llist *nonnull iovecs)
mlog_err(dd_log_info, "Error writing %zu bytes to helper", total);
efree(iovs);
return dd_network;
} else if (written == 0) {
}
if (written == 0) {
mlog(dd_log_info, "writev() call returned zero");
efree(iovs);
return dd_network;
Expand Down

0 comments on commit 55377fe

Please sign in to comment.