diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-07-23 17:16:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-25 02:31:36 -0400 |
commit | 7b18ef08ba58a91bef7149e64443397cfc2523f3 (patch) | |
tree | feff2ea5cbfcd8894697f09e656f55710c24a443 /drivers/isdn/i4l | |
parent | c81576c225b942496feb9fbef5bca506bc64ce57 (diff) |
isdn: use constants instead of magicnumbers
This patch changes instances of magic numbers like 4 and 8 to equivalent
constants.
The Coccinelle semantic patch used for making the change is as follows:
// <smpl>
@r@
type T;
T E;
identifier fld;
identifier c;
@@
E->fld & c
@s@
constant C;
identifier r.c;
@@
#define c C
@@
r.T E;
identifier r.fld;
identifier r.c;
constant s.C;
@@
E->fld &
- C
+ c
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index c2ed6246a389..94affa5e6f28 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -2918,8 +2918,8 @@ isdn_net_getcfg(isdn_net_ioctl_cfg *cfg) | |||
2918 | cfg->callback = 2; | 2918 | cfg->callback = 2; |
2919 | cfg->cbhup = (lp->flags & ISDN_NET_CBHUP) ? 1 : 0; | 2919 | cfg->cbhup = (lp->flags & ISDN_NET_CBHUP) ? 1 : 0; |
2920 | cfg->dialmode = lp->flags & ISDN_NET_DIALMODE_MASK; | 2920 | cfg->dialmode = lp->flags & ISDN_NET_DIALMODE_MASK; |
2921 | cfg->chargehup = (lp->hupflags & 4) ? 1 : 0; | 2921 | cfg->chargehup = (lp->hupflags & ISDN_CHARGEHUP) ? 1 : 0; |
2922 | cfg->ihup = (lp->hupflags & 8) ? 1 : 0; | 2922 | cfg->ihup = (lp->hupflags & ISDN_INHUP) ? 1 : 0; |
2923 | cfg->cbdelay = lp->cbdelay; | 2923 | cfg->cbdelay = lp->cbdelay; |
2924 | cfg->dialmax = lp->dialmax; | 2924 | cfg->dialmax = lp->dialmax; |
2925 | cfg->triggercps = lp->triggercps; | 2925 | cfg->triggercps = lp->triggercps; |