mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 09:22:23 +00:00
Fix SonarCloud complaint.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
5
dependencies/nDPIsrvd.h
vendored
5
dependencies/nDPIsrvd.h
vendored
@@ -655,6 +655,11 @@ static inline void nDPIsrvd_socket_free(struct nDPIsrvd_socket ** const sock)
|
|||||||
|
|
||||||
static inline int nDPIsrvd_setup_address(struct nDPIsrvd_address * const address, char const * const destination)
|
static inline int nDPIsrvd_setup_address(struct nDPIsrvd_address * const address, char const * const destination)
|
||||||
{
|
{
|
||||||
|
if (address == NULL || destination == NULL)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
size_t len = strlen(destination);
|
size_t len = strlen(destination);
|
||||||
char const * first_colon = strchr(destination, ':');
|
char const * first_colon = strchr(destination, ':');
|
||||||
char const * last_colon = strrchr(destination, ':');
|
char const * last_colon = strrchr(destination, ':');
|
||||||
|
|||||||
Reference in New Issue
Block a user