[PATCH] type-safe min() in prism54
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 1 Feb 2006 11:42:28 +0000 (06:42 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 8 Feb 2006 06:05:26 +0000 (01:05 -0500)
we do min() on u8 and small integer constant; cast the latter to u8.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/net/wireless/prism54/isl_ioctl.c

index c5cd61c7f92774043c3184b2b5b23983748adda0..e5bb9f5ae4291bf6b5e126219123e8454924bef9 100644 (file)
@@ -748,7 +748,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
        if (essid->length) {
                dwrq->flags = 1;        /* set ESSID to ON for Wireless Extensions */
                /* if it is to big, trunk it */
-               dwrq->length = min(IW_ESSID_MAX_SIZE, essid->length);
+               dwrq->length = min((u8)IW_ESSID_MAX_SIZE, essid->length);
        } else {
                dwrq->flags = 0;
                dwrq->length = 0;