summaryrefslogtreecommitdiffstats
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 {
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,