Staging: rtl8192e: Replace min macro with min_t

Instead of an explicit cast the min_t macro should be used.

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Silvan Jegen 2014-02-25 18:07:10 +01:00 committed by Greg Kroah-Hartman
parent 56f1411415
commit ffb8cc92a7
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ static int r8192_wx_set_nick(struct net_device *dev,
if (wrqu->data.length > IW_ESSID_MAX_SIZE)
return -E2BIG;
down(&priv->wx_sem);
wrqu->data.length = min((size_t) wrqu->data.length, sizeof(priv->nick));
wrqu->data.length = min_t(size_t, wrqu->data.length, sizeof(priv->nick));
memset(priv->nick, 0, sizeof(priv->nick));
memcpy(priv->nick, extra, wrqu->data.length);
up(&priv->wx_sem);