From 53e0a68806bc4b1d605ca92edbdd1a234c0960a8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 8 Nov 2012 17:25:09 +0100 Subject: lib/consoles: remove global variable initcp Signed-off-by: Karel Zak --- lib/consoles.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/consoles.c') diff --git a/lib/consoles.c b/lib/consoles.c index 2e9793f0e..bc7c039bd 100644 --- a/lib/consoles.c +++ b/lib/consoles.c @@ -170,13 +170,6 @@ char* scandev(DIR *dir, dev_t comparedev) /* * Default control characters for an unknown terminal line. */ -static -struct chardata initcp = { - CERASE, - CKILL, - CTRL('r'), - 0 -}; /* * Allocate an aligned `struct console' memory area, @@ -192,8 +185,15 @@ __attribute__((__nonnull__,__hot__)) #endif void consalloc(char * name) { + static const struct chardata initcp = { + .erase = CERASE, + .kill = CKILL, + .eol = CTRL('r'), + .parity = 0 + }; struct console *restrict tail; + if (posix_memalign((void*)&tail, sizeof(void*), alignof(typeof(struct console))) != 0) perror("memory allocation"); -- cgit v1.2.3-55-g7522