Skip to content

Commit

Permalink
fix argument mismatch for gethostnm (#298)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 authored Nov 13, 2023
1 parent 3cf0d3c commit eff3883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ static int printinaddr(struct lsof_context *ctx) {
if (Lf->li[i].ia.a4.s_addr == INADDR_ANY)
host = "*";
else
host = gethostnm((unsigned char *)&Lf->li[i].ia, Lf->li[i].af);
host = gethostnm(ctx, (unsigned char *)&Lf->li[i].ia, Lf->li[i].af);
#endif /* defined(HASIPv6) */

/*
Expand Down Expand Up @@ -2134,4 +2134,4 @@ char *print_fflags(struct lsof_context *ctx,
}
return (bp);
}
#endif /* defined(HASFSTRUCT) */
#endif /* defined(HASFSTRUCT) */

0 comments on commit eff3883

Please sign in to comment.