aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/slip_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/slip_common.h')
-rw-r--r--arch/um/drivers/slip_common.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/drivers/slip_common.h b/arch/um/drivers/slip_common.h
index 2ae76d8f1be1..d574e0a9dc13 100644
--- a/arch/um/drivers/slip_common.h
+++ b/arch/um/drivers/slip_common.h
@@ -88,12 +88,13 @@ struct slip_proto {
88 int esc; 88 int esc;
89}; 89};
90 90
91#define SLIP_PROTO_INIT { \ 91static inline void slip_proto_init(struct slip_proto * slip)
92 .ibuf = { '\0' }, \ 92{
93 .obuf = { '\0' }, \ 93 memset(slip->ibuf, 0, sizeof(slip->ibuf));
94 .more = 0, \ 94 memset(slip->obuf, 0, sizeof(slip->obuf));
95 .pos = 0, \ 95 slip->more = 0;
96 .esc = 0 \ 96 slip->pos = 0;
97 slip->esc = 0;
97} 98}
98 99
99extern int slip_proto_read(int fd, void *buf, int len, 100extern int slip_proto_read(int fd, void *buf, int len,