Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Jul 30, 2024
1 parent 1ac82f6 commit 4b3e1bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion appsec/src/extension/php_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ zend_string *nullable dd_php_get_string_elem(
return Z_STR_P(zresult);
}

zval *dd_hash_find_or_new(HashTable *ht, zend_string *key)
zval *nonnull dd_hash_find_or_new(
HashTable *nonnull ht, zend_string *nonnull key)
{
zval *result = zend_hash_find(ht, key);

Expand Down
14 changes: 7 additions & 7 deletions appsec/src/extension/php_helpers.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Unless explicitly stated otherwise all files in this repository are
// dual-licensed under the Apache-2.0 License or BSD-3-Clause License.
//
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2021 Datadog, Inc.
// This product includes software developed at Datadog
// (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
#pragma once

#include <php.h>
#include "attributes.h"
#include <php.h>

#ifdef ZTS
# define THREAD_LOCAL_ON_ZTS __thread
Expand Down Expand Up @@ -41,11 +41,11 @@ dd_php_array_type dd_php_determine_array_type(const zend_array *nonnull);

zval *nullable dd_php_get_autoglobal(
int track_var, const char *nonnull name, size_t len);
const zend_array *nonnull dd_get_superglob_or_equiv(
const char *nonnull name, size_t name_len, int track,
zend_array *nullable equiv);
const zend_array *nonnull dd_get_superglob_or_equiv(const char *nonnull name,
size_t name_len, int track, zend_array *nullable equiv);
zend_string *nullable dd_php_get_string_elem(
const zend_array *nullable arr, zend_string *nonnull zstr);
zend_string *nullable dd_php_get_string_elem_cstr(
const zend_array *nullable arr, const char *nonnull name, size_t len);
zval *dd_hash_find_or_new(HashTable *ht, zend_string *key);
zval *nonnull dd_hash_find_or_new(
HashTable *nonnull ht, zend_string *nonnull key);

0 comments on commit 4b3e1bf

Please sign in to comment.