software/bios/console: Call putsnonl() from puts()

puts() and putsnonl() are very similar, and can share code.
Reduce code size by making the former call the latter.

Impact for a RISC-V build:

    $ size console.o.orig console.o
       text	   data	    bss	    dec	    hex	filename
	868	      0	     12	    880	    370	console.o.orig
	832	      0	     12	    844	    34c	console.o

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
Geert Uytterhoeven 2021-02-08 13:31:54 +01:00
parent 8e4202ced1
commit 84e5130ac5
1 changed files with 1 additions and 4 deletions

View File

@ -75,10 +75,7 @@ int readchar_nonblock(void)
int puts(const char *s) int puts(const char *s)
{ {
while(*s) { putsnonl(s);
putchar(*s);
s++;
}
putchar('\n'); putchar('\n');
return 1; return 1;
} }