Index: kernel/generic/src/printf/printf_core.c
===================================================================
--- kernel/generic/src/printf/printf_core.c	(revision f25b2819e52daf39913b5aa2b2aa38a1208832d7)
+++ kernel/generic/src/printf/printf_core.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
@@ -253,9 +253,9 @@
 	if (str == NULL)
 		return printf_putstr(nullstr, ps);
-	
-	/* Print leading spaces */
-	size_t size = str_length(str);
+
+	/* Print leading spaces. */
+	count_t strw = str_length(str);
 	if (precision == 0)
-		precision = size;
+		precision = strw;
 
 	count_t counter = 0;
@@ -269,10 +269,10 @@
 
 	int retval;
-	size_t bytes = str_lsize(str, min(size, precision));
-	if ((retval = printf_putnchars_utf8(str, bytes, ps)) < 0)
+	size_t size = str_lsize(str, precision);
+	if ((retval = printf_putnchars_utf8(str, size, ps)) < 0)
 		return -counter;
-	
+
 	counter += retval;
-	
+
 	while (width-- > 0) {
 		if (printf_putchar(' ', ps) == 1)
@@ -281,4 +281,5 @@
 
 	return ((int) counter);
+
 }
 
@@ -292,15 +293,15 @@
  * @return Number of UTF-32 characters printed, negative value on failure.
  */
-static int print_utf32(wchar_t *str, int width, unsigned int precision,
+static int print_utf32(wchar_t *wstr, int width, unsigned int precision,
 	uint32_t flags, printf_spec_t *ps)
 {
-	if (str == NULL)
+	if (wstr == NULL)
 		return printf_putstr(nullstr, ps);
-	
-	/* Print leading spaces */
-	size_t size = wstr_length(str);
+
+	/* Print leading spaces. */
+	size_t strw = wstr_length(wstr);
 	if (precision == 0)
-		precision = size;
-	
+		precision = strw;
+
 	count_t counter = 0;
 	width -= precision;
@@ -311,17 +312,17 @@
 		}
 	}
-	
+
 	int retval;
-	size_t bytes = min(size, precision) * sizeof(wchar_t);
-	if ((retval = printf_putnchars_utf32(str, bytes, ps)) < 0)
+	size_t size = min(strw, precision) * sizeof(wchar_t);
+	if ((retval = printf_putnchars_utf32(wstr, size, ps)) < 0)
 		return -counter;
-	
+
 	counter += retval;
-	
+
 	while (width-- > 0) {
 		if (printf_putchar(' ', ps) == 1)
 			counter++;
 	}
-	
+
 	return ((int) counter);
 }
@@ -585,7 +586,7 @@
 int printf_core(const char *fmt, printf_spec_t *ps, va_list ap)
 {
-	index_t i = 0;  /* Index of the currently processed character from fmt */
-	index_t nxt = 0;
-	index_t j = 0;  /* Index to the first not printed nonformating character */
+	size_t i = 0;  /* Index of the currently processed character from fmt */
+	size_t nxt = 0;
+	size_t j = 0;  /* Index to the first not printed nonformating character */
 	
 	wchar_t uc;           /* Current UTF-32 character decoded from fmt */
Index: kernel/generic/src/printf/vprintf.c
===================================================================
--- kernel/generic/src/printf/vprintf.c	(revision f25b2819e52daf39913b5aa2b2aa38a1208832d7)
+++ kernel/generic/src/printf/vprintf.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
@@ -46,12 +46,12 @@
 static int vprintf_write_utf8(const char *str, size_t size, void *data)
 {
-	index_t index = 0;
-	index_t chars = 0;
-	
-	while (index < size) {
-		putchar(chr_decode(str, &index, size));
+	size_t offset = 0;
+	count_t chars = 0;
+
+	while (offset < size) {
+		putchar(chr_decode(str, &offset, size));
 		chars++;
 	}
-	
+
 	return chars;
 }
@@ -60,10 +60,10 @@
 {
 	index_t index = 0;
-	
+
 	while (index < (size / sizeof(wchar_t))) {
 		putchar(str[index]);
 		index++;
 	}
-	
+
 	return index;
 }
@@ -71,13 +71,13 @@
 int puts(const char *str)
 {
-	index_t index = 0;
-	index_t chars = 0;
+	size_t offset = 0;
+	count_t chars = 0;
 	wchar_t uc;
-	
-	while ((uc = chr_decode(str, &index, UTF8_NO_LIMIT)) != 0) {
+
+	while ((uc = chr_decode(str, &offset, UTF8_NO_LIMIT)) != 0) {
 		putchar(uc);
 		chars++;
 	}
-	
+
 	return chars;
 }
@@ -90,13 +90,13 @@
 		NULL
 	};
-	
+
 	ipl_t ipl = interrupts_disable();
 	spinlock_lock(&printf_lock);
-	
+
 	int ret = printf_core(fmt, &ps, ap);
-	
+
 	spinlock_unlock(&printf_lock);
 	interrupts_restore(ipl);
-	
+
 	return ret;
 }
Index: kernel/generic/src/printf/vsnprintf.c
===================================================================
--- kernel/generic/src/printf/vsnprintf.c	(revision f25b2819e52daf39913b5aa2b2aa38a1208832d7)
+++ kernel/generic/src/printf/vsnprintf.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
@@ -78,5 +78,5 @@
 	
 	if (left <= size) {
-		/* We have not enought space for whole string
+		/* We do not have enough space for the whole string
 		 * with the trailing zero => print only a part
 		 * of string
