apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.91k stars 1.18k forks source link

[BUG] lib_outstream_s putc and puts are redundant #14738

Open yamt opened 2 weeks ago

yamt commented 2 weeks ago

Description / Steps to reproduce the issue

lib_outstream_s has two seemingly-redundant methods, one for single-char operation and another for multi-chars operation, for no obvious reasons. (well, at least not obvious to me.) if it's necessary for some reasons, it should have been commented in the code. otherwise, one of them, maybe the single-char version which is likely slower, should be removed to save code size.

ditto for

On which OS does this issue occur?

[OS: Mac]

What is the version of your OS?

macOS 14.7

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Api]

Verification

xiaoxiang781216 commented 2 weeks ago

puts is added later to improve the performance, it's better to drop putc.