Skip to content

Commit 7251645

Browse files
xiaoxiang781216pkarashchenko
authored andcommitted
Fix some coding style issue
Signed-off-by: Xiang Xiao <[email protected]>
1 parent 8564165 commit 7251645

File tree

7 files changed

+82
-57
lines changed

7 files changed

+82
-57
lines changed

examples/ft80x/ft80x_main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ struct ft80x_exampleinfo_s
6161
* ft80x_prim_lines LINES Line drawing primitive
6262
* ft80x_prim_linestrip LINE_STRIP Line strip drawing primitive
6363
* ft80x_prim_edgestrip_r EDGE_STRIP_R Edge strip right side drawing
64-
primitive
64+
* primitive
6565
* (To be provided) EDGE_STRIP_L Edge strip left side drawing
66-
primitive
66+
* primitive
6767
* (To be provided) EDGE_STRIP_A Edge strip above side drawing
68-
primitive
68+
* primitive
6969
* (To be provided) EDGE_STRIP_B Edge strip below side drawing
70-
primitive
70+
* primitive
7171
* ft80x_prim_rectangles RECTS Rectangle drawing primitive
7272
* ft80x_prim_scissor SCISSOR Scissor primitive
7373
* ft80x_prim_stencil STENCIL Stencil primitives
@@ -96,7 +96,7 @@ static const struct ft80x_exampleinfo_s g_primitives[] =
9696
* possible options.
9797
*
9898
* FUNCTION CoProc CMD USED DESCRIPTION
99-
* ------------------------ --------------- ----------------------------------
99+
* ------------------------ --------------- --------------------------------
100100
* ft80x_coproc_button CMD_BUTTON Draw a button
101101
* ft80x_coproc_clock CMD_CLOCK Draw an analog clock
102102
* ft80x_coproc_gauge CMD_GAUGE Draw a gauge
@@ -109,12 +109,12 @@ static const struct ft80x_exampleinfo_s g_primitives[] =
109109
* ft80x_coproc_toggle CMD_TOGGLE Draw a toggle switch
110110
* ft80x_coproc_number CMD_NUMBER Draw a decimal number
111111
* ft80x_coproc_calibrate CMD_CALIBRATE Execute the touch screen
112-
calibration routine
112+
* calibration routine
113113
* ft80x_coproc_spinner CMD_SPINNER Start an animated spinner
114114
* ft80x_coproc_screensaver CMD_SCREENSAVER Start an animated screensaver
115115
* (To be provided) CMD_SKETCH Start a continuous sketch update
116116
* (To be provided) CMD_SNAPSHOT Take a snapshot of the current
117-
screen
117+
* screen
118118
* ft80x_coproc_logo CMD_LOGO Play device log animation
119119
*/
120120

@@ -180,7 +180,7 @@ static int ft80x_showname(int fd, FAR struct ft80x_dlbuffer_s *buffer,
180180
/* Clear the display */
181181

182182
cmds.clearrgb.cmd = FT80X_CLEAR_COLOR_RGB(0, 0, 0x80);
183-
cmds.clear.cmd = FT80X_CLEAR(1 ,1, 1);
183+
cmds.clear.cmd = FT80X_CLEAR(1, 1, 1);
184184
cmds.colorrgb.cmd = FT80X_COLOR_RGB(0xff, 0xff, 0xff);
185185

186186
/* Use the CMD_TEXT co-processor command to show the name of the next

examples/pdcurses/testcurs_main.c

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333

3434
#include "graphics/curses.h"
3535

36-
/****************************************************************************
37-
* Pre-processor Definitions
38-
****************************************************************************/
39-
4036
#ifdef WACS_S1
4137
# define HAVE_WIDE 1
4238
#else
@@ -49,6 +45,10 @@
4945
# include <wchar.h>
5046
#endif
5147

48+
/****************************************************************************
49+
* Pre-processor Definitions
50+
****************************************************************************/
51+
5252
#ifdef A_COLOR
5353
# define HAVE_COLOR 1
5454
#else
@@ -112,15 +112,15 @@ static const COMMAND command[] =
112112
{"Scroll Test", scroll_test},
113113
{"Input Test", input_test},
114114
{"Output Test", output_test},
115-
{"ACS Test", acs_test}
115+
{"ACS Test", acs_test},
116116
#if HAVE_COLOR
117-
, {"Color Test", color_test}
117+
{"Color Test", color_test},
118118
#endif
119119
#if HAVE_CLIPBOARD
120-
, {"Clipboard Test", clipboard_test}
120+
{"Clipboard Test", clipboard_test},
121121
#endif
122122
#if HAVE_WIDE
123-
, {"Wide Input", wide_test}
123+
{"Wide Input", wide_test},
124124
#endif
125125
};
126126

@@ -139,9 +139,9 @@ static const char *acs_names[] =
139139
"ACS_PLMINUS", "ACS_BULLET",
140140

141141
"ACS_LARROW", "ACS_RARROW", "ACS_UARROW", "ACS_DARROW",
142-
"ACS_BOARD", "ACS_LANTERN", "ACS_BLOCK"
142+
"ACS_BOARD", "ACS_LANTERN", "ACS_BLOCK",
143143
#ifdef ACS_S3
144-
, "ACS_S3", "ACS_S7", "ACS_LEQUAL", "ACS_GEQUAL",
144+
"ACS_S3", "ACS_S7", "ACS_LEQUAL", "ACS_GEQUAL",
145145
"ACS_PI", "ACS_NEQUAL", "ACS_STERLING"
146146
#endif
147147
};
@@ -240,6 +240,7 @@ static int init_test(WINDOW ** win, int argc, char *argv[])
240240
start_color();
241241
}
242242
#endif
243+
243244
/* Create a drawing window */
244245

245246
width = 60;
@@ -357,7 +358,7 @@ static void input_test(WINDOW *win)
357358
sw = w / 3;
358359
sh = h / 3;
359360

360-
if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL)
361+
if (!(subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)))
361362
{
362363
return;
363364
}
@@ -679,7 +680,7 @@ static void output_test(WINDOW *win)
679680

680681
wattron(win1, A_BLINK);
681682
mvwaddstr(win1, 4, 1,
682-
"This blinking text should appear in only the second window");
683+
"This blinking text should appear in only the second window");
683684
wattroff(win1, A_BLINK);
684685

685686
mvwin(win1, by, bx);
@@ -726,7 +727,7 @@ static void output_test(WINDOW *win)
726727

727728
wclear(win);
728729
wmove(win, 2, 2);
729-
wprintw(win, "This is a formatted string in a window: %d %s\n", 42, "is it");
730+
wprintw(win, "This is a formatted string in a window: %d is it\n", 42);
730731
mvwaddstr(win, 10, 1, "Enter a string: ");
731732
wrefresh(win);
732733
echo();
@@ -890,7 +891,8 @@ static void clipboard_test(WINDOW *win)
890891
FAR struct pdc_context_s *ctx = PDC_ctx();
891892
#endif
892893

893-
mvaddstr(1, 1, "This test will display the contents of the system clipboard");
894+
mvaddstr(1, 1,
895+
"This test will display the contents of the system clipboard");
894896

895897
continue2();
896898

@@ -923,7 +925,7 @@ static void clipboard_test(WINDOW *win)
923925

924926
clear();
925927
mvaddstr(1, 1,
926-
"This test will place the following string in the system clipboard:");
928+
"This test will place the following string in the system clipboard:");
927929
mvaddstr(2, 1, text);
928930

929931
i = PDC_setclipboard(text, strlen(text));
@@ -1077,7 +1079,8 @@ static void color_test(WINDOW *win)
10771079
for (j = 0; j < 16; j++)
10781080
{
10791081
mvaddch(tmarg + i + 5, col2 + j, fill | COLOR_PAIR(i + 4));
1080-
mvaddch(tmarg + i + 5, col3 + j, fill | COLOR_PAIR(i + 4) | A_BOLD);
1082+
mvaddch(tmarg + i + 5, col3 + j,
1083+
fill | COLOR_PAIR(i + 4) | A_BOLD);
10811084
}
10821085
}
10831086

@@ -1094,7 +1097,7 @@ static void color_test(WINDOW *win)
10941097
short red;
10951098
short green;
10961099
short blue;
1097-
} orgcolors[16];
1100+
}orgcolors[16];
10981101

10991102
int MAXCOL = (COLORS >= 16) ? 16 : 8;
11001103

@@ -1130,7 +1133,8 @@ static void color_test(WINDOW *win)
11301133

11311134
for (i = 0; i < MAXCOL; i++)
11321135
{
1133-
init_color(i, orgcolors[i].red, orgcolors[i].green, orgcolors[i].blue);
1136+
init_color(i, orgcolors[i].red,
1137+
orgcolors[i].green, orgcolors[i].blue);
11341138
}
11351139
}
11361140
}
@@ -1175,7 +1179,8 @@ void display_menu(int old_option, int new_option)
11751179
#ifdef CONFIG_PDCURSES_MULTITHREAD
11761180
FAR struct pdc_context_s *ctx = PDC_ctx();
11771181
#endif
1178-
int lmarg = (COLS - 14) / 2, tmarg = (LINES - (MAX_OPTIONS + 2)) / 2;
1182+
int lmarg = (COLS - 14) / 2;
1183+
int tmarg = (LINES - (MAX_OPTIONS + 2)) / 2;
11791184

11801185
if (old_option == -1)
11811186
{

lte/alt1250/alt1250_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Included Files
2626
****************************************************************************/
2727

28-
#include <sys/params.h>
28+
#include <sys/param.h>
2929

3030
#include "alt1250_daemon.h"
3131

netutils/thttpd/mime_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/****************************************************************************
22
* apps/netutils/thttpd/mime_types.h
3-
* Provides mappings between filename extensions and MIME types and encodings.
3+
* Provides mappings between filename extensions, MIME types and encodings.
44
*
55
* Based on mime_encodings.txt and mime_types.txt by Jef Poskanser which
66
* contained no copyright information.

netutils/thttpd/tdate_parse.c

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int strlong_compare(const void *v1, const void *v2)
9191
#endif
9292

9393
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
94-
static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
94+
static int strlong_search(char *str, struct strlong *tab, int n, long *lp)
9595
{
9696
int i;
9797
int h;
@@ -114,7 +114,7 @@ static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
114114
}
115115
else
116116
{
117-
*lP = tab[i].l;
117+
*lp = tab[i].l;
118118
return 1;
119119
}
120120

@@ -127,16 +127,24 @@ static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
127127
#endif
128128

129129
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
130-
static int scan_wday(char *str_wday, long *tm_wdayP)
130+
static int scan_wday(char *str_wday, long *tm_wdayp)
131131
{
132-
static struct strlong wday_tab[] = {
133-
{"sun", 0}, {"sunday", 0},
134-
{"mon", 1}, {"monday", 1},
135-
{"tue", 2}, {"tuesday", 2},
136-
{"wed", 3}, {"wednesday", 3},
137-
{"thu", 4}, {"thursday", 4},
138-
{"fri", 5}, {"friday", 5},
139-
{"sat", 6}, {"saturday", 6},
132+
static struct strlong wday_tab[] =
133+
{
134+
{"sun", 0},
135+
{"sunday", 0},
136+
{"mon", 1},
137+
{"monday", 1},
138+
{"tue", 2},
139+
{"tuesday", 2},
140+
{"wed", 3},
141+
{"wednesday", 3},
142+
{"thu", 4},
143+
{"thursday", 4},
144+
{"fri", 5},
145+
{"friday", 5},
146+
{"sat", 6},
147+
{"saturday", 6},
140148
};
141149

142150
static int sorted = 0;
@@ -149,26 +157,38 @@ static int scan_wday(char *str_wday, long *tm_wdayP)
149157
}
150158

151159
pound_case(str_wday);
152-
return strlong_search(str_wday, wday_tab, nitems(wday_tab), tm_wdayP);
160+
return strlong_search(str_wday, wday_tab, nitems(wday_tab), tm_wdayp);
153161
}
154162
#endif /* Day of week not yet supported by NuttX */
155163

156164
#ifdef TDATE_PARSE_WORKS
157-
static int scan_mon(char *str_mon, long *tm_monP)
165+
static int scan_mon(char *str_mon, long *tm_monp)
158166
{
159-
static struct strlong mon_tab[] = {
160-
{"jan", 0}, {"january", 0},
161-
{"feb", 1}, {"february", 1},
162-
{"mar", 2}, {"march", 2},
163-
{"apr", 3}, {"april", 3},
167+
static struct strlong mon_tab[] =
168+
{
169+
{"jan", 0},
170+
{"january", 0},
171+
{"feb", 1},
172+
{"february", 1},
173+
{"mar", 2},
174+
{"march", 2},
175+
{"apr", 3},
176+
{"april", 3},
164177
{"may", 4},
165-
{"jun", 5}, {"june", 5},
166-
{"jul", 6}, {"july", 6},
167-
{"aug", 7}, {"august", 7},
168-
{"sep", 8}, {"september", 8},
169-
{"oct", 9}, {"october", 9},
170-
{"nov", 10}, {"november", 10},
171-
{"dec", 11}, {"december", 11},
178+
{"jun", 5},
179+
{"june", 5},
180+
{"jul", 6},
181+
{"july", 6},
182+
{"aug", 7},
183+
{"august", 7},
184+
{"sep", 8},
185+
{"september", 8},
186+
{"oct", 9},
187+
{"october", 9},
188+
{"nov", 10},
189+
{"november", 10},
190+
{"dec", 11},
191+
{"december", 11},
172192
};
173193

174194
static int sorted = 0;
@@ -181,7 +201,7 @@ static int scan_mon(char *str_mon, long *tm_monP)
181201
}
182202

183203
pound_case(str_mon);
184-
return strlong_search(str_mon, mon_tab, nitems(mon_tab), tm_monP);
204+
return strlong_search(str_mon, mon_tab, nitems(mon_tab), tm_monp);
185205
}
186206
#endif
187207

testing/crypto/hmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int main(void)
193193
{
194194
char output[32];
195195
int ret = 0;
196-
for (int i = 0; i < nitems(testcase) i++)
196+
for (int i = 0; i < nitems(testcase); i++)
197197
{
198198
ret += syshmac(CRYPTO_MD5_HMAC, testcase[i].key,
199199
testcase[i].keylen,

testing/drivertest/drivertest_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <sys/types.h>
2828
#include <sys/ioctl.h>
2929
#include <sys/time.h>
30-
#include <sys/params.h>
30+
#include <sys/param.h>
3131

3232
#include <stdarg.h>
3333
#include <stddef.h>

0 commit comments

Comments
 (0)