NET: pktgen - fix compile warning
Subsystems (2)
PATCH 1/1 NET: pktgen - fix compile warning
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
---
Unless somebody already beat me to it...
net/core/pktgen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/pktgen.c +1 -1
@@ -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 ;
Signature · 1 line
Dmitry
Good catch; sorry I missed that.
Quoted 30 lines · Dmitry Torokhov
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 castSigned-off-by Dmitry Torokhov <[email protected]>---
Unless somebody already beat me to it...
net/core/pktgen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/core/pktgen.c +1
-1@@ -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 ;Signature · 2 lines
-- Dmitry
From: Nelson Elhage <[email protected]>
Date: Sun, 7 Nov 2010 08:16:24 -0500
Quoted 11 lines
Good catch; sorry I missed that.
Reviewed-by Nelson Elhage <[email protected]>Quoted 6 lines · Dmitry Torokhov
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 castSigned-off-by Dmitry Torokhov <[email protected]>
Applied.