Skip to content

feat(os): add os_strncmp definition - #430

Merged
aloisklink merged 1 commit into
mainfrom
feat/add-os_strncmp
Feb 20, 2023
Merged

feat(os): add os_strncmp definition#430
aloisklink merged 1 commit into
mainfrom
feat/add-os_strncmp

Conversation

@aloisklink

Copy link
Copy Markdown
Contributor

Source-code taken from the hostap project expects a os_strncmp call that points to strncmp.


Adapted from commit https://github.com/nqminds/edgesec/commits/12d15b2405aa6f2ab39a31d880499f8fc6f84c02, which instead names this macro sys_strncmp.

edgesec/src/utils/os.h

Lines 67 to 69 in 12d15b2

#ifndef sys_strncmp
#define sys_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
#endif

Using os_strncmp is a lot easier, since then we can avoid changing any of the hostap code.

Source-code taken from the hostap project expect a `os_strncmp`
call that points to `strncmp`.
@aloisklink aloisklink added the refactor Refactoring code label Feb 17, 2023
@aloisklink aloisklink added this to the RADIUS ERP Server milestone Feb 17, 2023
@aloisklink aloisklink added enhancement New feature or request and removed refactor Refactoring code labels Feb 17, 2023
@aloisklink aloisklink mentioned this pull request Feb 17, 2023
@codecov

codecov Bot commented Feb 17, 2023

Copy link
Copy Markdown

Codecov Report

Merging #430 (b0e1aee) into main (ba237fd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #430   +/-   ##
=======================================
  Coverage   53.09%   53.09%           
=======================================
  Files         144      144           
  Lines       19880    19880           
=======================================
  Hits        10555    10555           
  Misses       9325     9325           
Impacted Files Coverage Δ
src/utils/os.h 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aloisklink
aloisklink added this pull request to the merge queue Feb 20, 2023
Merged via the queue into main with commit 656a847 Feb 20, 2023
@aloisklink
aloisklink deleted the feat/add-os_strncmp branch February 20, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants