diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-10-30 10:41:08 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-10-31 10:04:19 -0400 |
| commit | 1cb6b71b4059b5fba67f78aebdbd7b4c6d8547df (patch) | |
| tree | 95a5fcc94d74c637b9454cab0bdb0a68575a4168 /lib | |
| parent | 7ebda3892c446154e10dc13ea488e4e2ebd40d21 (diff) | |
lib, tests: Remove in6addr_cmp function from the system
This function should just be memcmp.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sockunion.c | 17 | ||||
| -rw-r--r-- | lib/sockunion.h | 1 |
2 files changed, 0 insertions, 18 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c index 1b08a06e93..4a7c190953 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -588,23 +588,6 @@ static void __attribute__((unused)) sockunion_print(const union sockunion *su) } } -int in6addr_cmp(const struct in6_addr *addr1, const struct in6_addr *addr2) -{ - unsigned int i; - const uint8_t *p1, *p2; - - p1 = (const uint8_t *)addr1; - p2 = (const uint8_t *)addr2; - - for (i = 0; i < sizeof(struct in6_addr); i++) { - if (p1[i] > p2[i]) - return 1; - else if (p1[i] < p2[i]) - return -1; - } - return 0; -} - int sockunion_cmp(const union sockunion *su1, const union sockunion *su2) { if (su1->sa.sa_family > su2->sa.sa_family) diff --git a/lib/sockunion.h b/lib/sockunion.h index 146651225c..5152e70a23 100644 --- a/lib/sockunion.h +++ b/lib/sockunion.h @@ -93,7 +93,6 @@ enum connect_result { connect_error, connect_success, connect_in_progress }; /* Prototypes. */ extern int str2sockunion(const char *, union sockunion *); extern const char *sockunion2str(const union sockunion *, char *, size_t); -int in6addr_cmp(const struct in6_addr *addr1, const struct in6_addr *addr2); extern int sockunion_cmp(const union sockunion *, const union sockunion *); extern int sockunion_same(const union sockunion *, const union sockunion *); extern unsigned int sockunion_hash(const union sockunion *); |
