Skip to contentSkip to conversation

ppp: use PPP_TRANS instead of the magic number 0x20

PATCH Applied Changli Gao 2 participants 2 messages Jun 15, 2011 – Jun 17, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppp: use PPP_TRANS instead of the magic number 0x20

---
 drivers/net/ppp_async.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ppp_async.c +2 -2
index 6436ba9..c6ba643 100644
@@ -524,7 +524,7 @@ static void ppp_async_process(unsigned long arg)
 #define PUT_BYTE(ap, buf, c, islcp)	do {		\
 	if ((islcp && c < 0x20) || (ap->xaccm[c >> 5] & (1 << (c & 0x1f)))) {\
 		*buf++ = PPP_ESCAPE;			\
-		*buf++ = c ^ 0x20;			\
+		*buf++ = c ^ PPP_TRANS;			\
 	} else						\
 		*buf++ = c;				\
 } while (0)
@@ -897,7 +897,7 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
 				sp = skb_put(skb, n);
 				memcpy(sp, buf, n);
 				if (ap->state & SC_ESCAPE) {
-					sp[0] ^= 0x20;
+					sp[0] ^= PPP_TRANS;
 					ap->state &= ~SC_ESCAPE;
 				}
 			}