diff options
Diffstat (limited to 'arch/um/drivers/slip_common.h')
-rw-r--r-- | arch/um/drivers/slip_common.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/drivers/slip_common.h b/arch/um/drivers/slip_common.h index 2ae76d8..d574e0a 100644 --- a/arch/um/drivers/slip_common.h +++ b/arch/um/drivers/slip_common.h @@ -88,12 +88,13 @@ struct slip_proto { int esc; }; -#define SLIP_PROTO_INIT { \ - .ibuf = { '\0' }, \ - .obuf = { '\0' }, \ - .more = 0, \ - .pos = 0, \ - .esc = 0 \ +static inline void slip_proto_init(struct slip_proto * slip) +{ + memset(slip->ibuf, 0, sizeof(slip->ibuf)); + memset(slip->obuf, 0, sizeof(slip->obuf)); + slip->more = 0; + slip->pos = 0; + slip->esc = 0; } extern int slip_proto_read(int fd, void *buf, int len, |