Skip to content

Commit

Permalink
Minor code style fixes
Browse files Browse the repository at this point in the history
Fix issue in these files:
examples/flowc/flowc_mktestdata.c
examples/nxhello/nxhello_listener.c
examples/system/system_main.c
fsutils/passwd/passwd_append.c
graphics/ft80x/ft80x_gpio.c
graphics/pdcurs34/pdcurses/pdc_keyname.c
graphics/pdcurs34/pdcurses/pdc_touch.c
modbus/functions/mbfuncdiag.c

Fixed by AI and checked by manual

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
  • Loading branch information
no1wudi authored and xiaoxiang781216 committed Sep 14, 2024
1 parent b5f8520 commit 140647c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/flowc/flowc_mktestdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int argc, char **envp)

for (i = 0; i < 100; i++)
{
for (ch = 0x20; ch < 0x7F; ch++)
for (ch = 0x20; ch < 0x7f; ch++)
{
putchar(ch);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/nxhello/nxhello_listener.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/nxterm/nxhello_listener.c
* apps/examples/nxhello/nxhello_listener.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -46,7 +46,7 @@ FAR void *nxhello_listener(FAR void *arg)

/* Process events forever */

for (;;)
for (; ; )
{
/* Handle the next event. If we were configured blocking, then
* we will stay right here until the next event is received. Since
Expand Down
4 changes: 4 additions & 0 deletions examples/system/system_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#include <stdio.h>
#include <stdlib.h>

/****************************************************************************
* Public Functions
****************************************************************************/

/****************************************************************************
* Name: system_main
****************************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions fsutils/passwd/passwd_append.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ int passwd_append(FAR const char *username, FAR const char *password)

stream = fopen(CONFIG_FSUTILS_PASSWD_PATH, "a");
if (stream == NULL)
{
{
int errcode = errno;
DEBUGASSERT(errcode > 0);
return errcode;
}
}

/* The format of the password file is:
*
Expand Down
1 change: 0 additions & 1 deletion graphics/ft80x/ft80x_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ int ft80x_gpio_configure(int fd, uint8_t gpio, uint8_t dir, uint8_t drive,

/* Set the pin direction */


ret = ft80x_getreg8(fd, FT80X_REG_GPIO_DIR, &regval8);
if (ret < 0)
{
Expand Down
2 changes: 1 addition & 1 deletion graphics/pdcurs34/pdcurses/pdc_keyname.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/graphics/pdcurses/pdc_keyname.c
* apps/graphics/pdcurs34/pdcurses/pdc_keyname.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion graphics/pdcurs34/pdcurses/pdc_touch.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/graphics/pdcurses/pdc_touch.c
* apps/graphics/pdcurs34/pdcurses/pdc_touch.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down
6 changes: 5 additions & 1 deletion modbus/functions/mbfuncdiag.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/functions/mbfuncdiag.c
* apps/modbus/functions/mbfuncdiag.c
*
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
Expand Down Expand Up @@ -28,3 +28,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/

/****************************************************************************
* Public Functions
****************************************************************************/

0 comments on commit 140647c

Please sign in to comment.