diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-11-22 08:56:40 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-11-22 08:56:40 +0300 |
commit | 81ca3923a29ea9b67f7291be23b210019546aa5f (patch) | |
tree | fcebf0d426665b4f06e01168f27cd8f9ab8c50d8 /accel-pppd/ctrl/l2tp/packet.c | |
parent | 830c399cf126f6bf1e8dfa1ad919a3ce8e346c5d (diff) | |
download | accel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.tar.gz accel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.zip |
remove trailing whitespaces
Diffstat (limited to 'accel-pppd/ctrl/l2tp/packet.c')
-rw-r--r-- | accel-pppd/ctrl/l2tp/packet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c index 78e0789..34e4bb6 100644 --- a/accel-pppd/ctrl/l2tp/packet.c +++ b/accel-pppd/ctrl/l2tp/packet.c @@ -69,7 +69,7 @@ struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type, struct l2tp_packet_t *pack = mempool_alloc(pack_pool); if (!pack) return NULL; - + memset(pack, 0, sizeof(*pack)); INIT_LIST_HEAD(&pack->attrs); pack->hdr.ver = ver; @@ -250,16 +250,16 @@ int l2tp_recv(int fd, struct l2tp_packet_t **p, struct in_pktinfo *pkt_info, memset(&msg, 0, sizeof(msg)); msg.msg_control = msg_control; msg.msg_controllen = 128; - + n = recvmsg(fd, &msg, MSG_PEEK); - + if (n < 0) { if (errno == EAGAIN) return -1; log_error("l2tp: recvmsg: %s\n", strerror(errno)); return 0; } - + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) { memcpy(pkt_info, CMSG_DATA(cmsg), sizeof(*pkt_info)); |