Skip to content

Commit

Permalink
NET: pktgen - fix compile warning
Browse files Browse the repository at this point in the history
This should fix the following warning:

net/core/pktgen.c: In function ‘pktgen_if_write’:
net/core/pktgen.c:890: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Reviewed-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Torokhov authored and David S. Miller committed Nov 7, 2010
1 parent 22e76c8 commit 86c2c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ static ssize_t pktgen_if_write(struct file *file,
i += len;

if (debug) {
size_t copy = min(count, 1023);
size_t copy = min_t(size_t, count, 1023);
char tb[copy + 1];
if (copy_from_user(tb, user_buffer, copy))
return -EFAULT;
Expand Down

0 comments on commit 86c2c0a

Please sign in to comment.