xiaoxiang781216 commented on code in PR #10565:
URL: https://github.com/apache/nuttx/pull/10565#discussion_r1322310369
##########
libs/libc/stream/lib_bufferedoutstream.c:
##########
@@ -61,28 +61,28 @@ static int bufferedoutstream_flush(FAR struct
lib_outstream_s *this)
* Name: bufferedoutstream_puts
****************************************************************************/
-static int bufferedoutstream_puts(FAR struct lib_outstream_s *this,
+static int bufferedoutstream_puts(FAR struct lib_outstream_s *self,
FAR const void *buf, int len)
{
- FAR struct lib_bufferedoutstream_s *rthis =
- (FAR struct lib_bufferedoutstream_s *)this;
+ FAR struct lib_bufferedoutstream_s *stream =
+ (FAR struct lib_bufferedoutstream_s *)self;
int ret = len;
- if (rthis->pending + len <= CONFIG_STREAM_OUT_BUFFER_SIZE)
+ if (stream->pending + len <= CONFIG_STREAM_OUT_BUFFER_SIZE)
{
/* If buffer is enough to save incoming data, cache it */
- memcpy(rthis->buffer + rthis->pending, buf, len);
- rthis->pending += len;
+ memcpy(stream->buffer + stream->pending, buf, len);
+ stream->pending += len;
Review Comment:
ditto
##########
libs/libc/stream/lib_bufferedoutstream.c:
##########
@@ -40,18 +40,18 @@
* Name: bufferedoutstream_flush
****************************************************************************/
-static int bufferedoutstream_flush(FAR struct lib_outstream_s *this)
+static int bufferedoutstream_flush(FAR struct lib_outstream_s *self)
{
- FAR struct lib_bufferedoutstream_s *rthis =
- (FAR struct lib_bufferedoutstream_s *)this;
+ FAR struct lib_bufferedoutstream_s *stream =
+ (FAR struct lib_bufferedoutstream_s *)self;
int ret = OK;
- ret = lib_stream_puts(rthis->backend, rthis->buffer,
- rthis->pending);
+ ret = lib_stream_puts(stream->backend, stream->buffer,
+ stream->pending);
if (ret >= 0)
{
- rthis->pending = 0;
+ stream->pending = 0;
Review Comment:
remove the extra indent
##########
libs/libc/stream/lib_stdsostream.c:
##########
@@ -70,18 +71,19 @@ static void stdsostream_putc(FAR struct lib_sostream_s
*self, int ch)
static int stdsostream_puts(FAR struct lib_sostream_s *self,
FAR const void *buffer, int len)
{
- FAR struct lib_stdsostream_s *stdsostream = (FAR struct lib_stdsostream_s
*)self;
+ FAR struct lib_stdsostream_s *ostream =
Review Comment:
why change
##########
libs/libc/stream/lib_stdsostream.c:
##########
@@ -106,10 +108,11 @@ static int stdsostream_puts(FAR struct lib_sostream_s
*self,
#ifndef CONFIG_STDIO_DISABLE_BUFFERING
static int stdsostream_flush(FAR struct lib_sostream_s *self)
{
- FAR struct lib_stdsostream_s *stdsostream = (FAR struct lib_stdsostream_s
*)self;
+ FAR struct lib_stdsostream_s *ostream =
Review Comment:
why change
##########
libs/libc/stream/lib_stdsostream.c:
##########
@@ -120,10 +123,11 @@ static int stdsostream_flush(FAR struct lib_sostream_s
*self)
static off_t stdsostream_seek(FAR struct lib_sostream_s *self, off_t offset,
int whence)
{
- FAR struct lib_stdsostream_s *stdsostream = (FAR struct lib_stdsostream_s
*)self;
+ FAR struct lib_stdsostream_s *ostream =
Review Comment:
why change
##########
libs/libc/stream/lib_hexdumpstream.c:
##########
@@ -77,15 +77,15 @@ static size_t bin2hex(FAR const uint8_t *buf, size_t buflen,
* Name: hexdumpstream_flush
****************************************************************************/
-static int hexdumpstream_flush(FAR struct lib_outstream_s *this)
+static int hexdumpstream_flush(FAR struct lib_outstream_s *self)
{
- FAR struct lib_hexdumpstream_s *rthis = (FAR void *)this;
+ FAR struct lib_hexdumpstream_s *stream = (FAR void *)self;
- if (rthis->pending > 0)
+ if (stream->pending > 0)
{
- rthis->buffer[rthis->pending] = '\n';
- lib_stream_puts(rthis->backend, rthis->buffer, rthis->pending + 1);
- rthis->pending = 0;
+ stream->buffer[stream->pending] = '\n';
Review Comment:
ditto
##########
arch/arm64/src/common/arm64_initialize.c:
##########
@@ -145,7 +145,7 @@ static void up_color_intstack(void)
****************************************************************************/
#ifdef CONFIG_ARCH_FPU
-int arm64_panic_disable_fpu(struct notifier_block *this,
+int arm64_panic_disable_fpu(struct notifier_block *panicblock,
Review Comment:
change to block
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]