Skip to content

Commit

Permalink
fixup! Fix issues reported by SonarCloud and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Apr 16, 2024
1 parent 5a9d272 commit b01ba1c
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 59 deletions.
1 change: 1 addition & 0 deletions security/oc_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ oc_sec_acl_free(void)
#ifdef OC_DYNAMIC_ALLOCATION
if (g_aclist != NULL) {
free(g_aclist);
g_aclist = NULL;
}
#endif /* OC_DYNAMIC_ALLOCATION */
}
Expand Down
4 changes: 3 additions & 1 deletion security/oc_acl_util_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@

#include "oc_endpoint.h"
#include "oc_ri.h"
#include "util/oc_compiler.h"

#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

/** Check method access to given resource */
bool oc_sec_check_acl(oc_method_t method, const oc_resource_t *resource,
const oc_endpoint_t *endpoint);
const oc_endpoint_t *endpoint) OC_NONNULL();

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit b01ba1c

Please sign in to comment.