Skip to content

Commit

Permalink
proto_ipsec: Fix various compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed May 11, 2024
1 parent 3871654 commit a55900a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion modules/proto_ipsec/ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,9 @@ void ipsec_ctx_release_tmp_user(struct ipsec_user *user)

void ipsec_ctx_release_user(struct ipsec_ctx *ctx)
{
int release;
int release = 0;
struct ipsec_user *user = ctx->user;

lock_get(&user->lock);
if (list_is_valid(&ctx->list)) {
list_del(&ctx->list);
Expand Down
3 changes: 2 additions & 1 deletion modules/proto_ipsec/ipsec_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ void ipsec_dump_users_rec(struct ipsec_map_node *nodes, int size, unsigned char
impi = list_entry(it, struct ipsec_user_impi, list);
list_for_each(it2, &impi->users) {
user = list_entry(it2, struct ipsec_user, list);
LM_DBG("print %hu.%hu.%hu.%hu - %.*s/%.*s\n", buf[0], buf[1], buf[2], buf[3],
LM_DBG("print %u.%u.%u.%u - %.*s/%.*s\n",
(unsigned)buf[0], (unsigned)buf[1], (unsigned)buf[2], (unsigned)buf[3],
user->impi.len, user->impi.s, user->impu.len, user->impu.s);
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/proto_ipsec/proto_ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static int proto_ipsec_add_listeners(void)
si->flags |= SI_INTERNAL;
udp = new_sock_info(si);
if (!udp) {
LM_ERR("could not add UDP listening sucket for %s:%hu\n",
LM_ERR("could not add UDP listening sucket for %s:%d\n",
si->name, si->port);
return -1;
}
Expand All @@ -326,7 +326,7 @@ static int proto_ipsec_add_listeners(void)
si->flags |= SI_REUSEPORT;
tcp = new_sock_info(si);
if (!tcp) {
LM_ERR("could not add TCP listening sucket for %s:%hu\n",
LM_ERR("could not add TCP listening sucket for %s:%d\n",
si->name, si->port);
return -1;
}
Expand Down

0 comments on commit a55900a

Please sign in to comment.