Skip to content

Commit

Permalink
tools: bpf_jit_disasm: make get_last_jit_image return unsigned
Browse files Browse the repository at this point in the history
The function returns always non-negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Andrzej Hajda authored and davem330 committed Sep 29, 2015
1 parent 7c85af8 commit 4de61ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/net/bpf_jit_disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ static void put_log_buff(char *buff)
free(buff);
}

static int get_last_jit_image(char *haystack, size_t hlen,
uint8_t *image, size_t ilen)
static unsigned int get_last_jit_image(char *haystack, size_t hlen,
uint8_t *image, size_t ilen)
{
char *ptr, *pptr, *tmp;
off_t off = 0;
Expand Down

0 comments on commit 4de61ba

Please sign in to comment.