[PATCH] ppp: avoid hard-coded magic constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use predefined macros for PPP address and control
instead of the hard-coded constants.

Signed-off-by: Kirill Smirnov <kirill.k.smirnov@xxxxxxxxx>
---
 drivers/net/ppp/ppp_async.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 9c889e0..d1eefef 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -571,10 +571,10 @@ ppp_async_encode(struct asyncppp *ap)
                 * Put in the address/control bytes if necessary
                 */
                if ((ap->flags & SC_COMP_AC) == 0 || islcp) {
-                       PUT_BYTE(ap, buf, 0xff, islcp);
-                       fcs = PPP_FCS(fcs, 0xff);
-                       PUT_BYTE(ap, buf, 0x03, islcp);
-                       fcs = PPP_FCS(fcs, 0x03);
+                       PUT_BYTE(ap, buf, PPP_ALLSTATIONS, islcp);
+                       fcs = PPP_FCS(fcs, PPP_ALLSTATIONS);
+                       PUT_BYTE(ap, buf, PPP_UI, islcp);
+                       fcs = PPP_FCS(fcs, PPP_UI);
                }
        }

-- 
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux