linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppp: avoid hard-coded magic constants
@ 2015-12-04 13:28 Kirill Smirnov
  0 siblings, 0 replies; only message in thread
From: Kirill Smirnov @ 2015-12-04 13:28 UTC (permalink / raw)
  To: linux-ppp

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

Signed-off-by: Kirill Smirnov <kirill.k.smirnov@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-04 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 13:28 [PATCH] ppp: avoid hard-coded magic constants Kirill Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).