summaryrefslogtreecommitdiff
path: root/drivers/net/ppp/ppp_synctty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp/ppp_synctty.c')
-rw-r--r--drivers/net/ppp/ppp_synctty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index 9ae53986cb4a..7868c29071d4 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -697,8 +697,7 @@ ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
goto err;
}
- p = skb_put(skb, count);
- memcpy(p, buf, count);
+ skb_put_data(skb, buf, count);
/* strip address/control field if present */
p = skb->data;
@@ -712,7 +711,7 @@ ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
/* decompress protocol field if compressed */
if (p[0] & 1) {
/* protocol is compressed */
- skb_push(skb, 1)[0] = 0;
+ *(u8 *)skb_push(skb, 1) = 0;
} else if (skb->len < 2)
goto err;