Skip to content

Commit eee86cf

Browse files
committed
websocket_console: fix syntax
Fix layout and syntax with uncrustify after changing to new logger. Signed-off-by: Anas Nashif <[email protected]>
1 parent 26ff99a commit eee86cf

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

drivers/console/websocket_console.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);
2727
#include <net/net_pkt.h>
2828
#include <net/websocket_console.h>
2929

30-
#define NVT_NUL 0
31-
#define NVT_LF 10
32-
#define NVT_CR 13
30+
#define NVT_NUL 0
31+
#define NVT_LF 10
32+
#define NVT_CR 13
3333

34-
#define WS_CONSOLE_STACK_SIZE CONFIG_WEBSOCKET_CONSOLE_STACK_SIZE
35-
#define WS_CONSOLE_PRIORITY CONFIG_WEBSOCKET_CONSOLE_PRIO
36-
#define WS_CONSOLE_TIMEOUT K_MSEC(CONFIG_WEBSOCKET_CONSOLE_SEND_TIMEOUT)
37-
#define WS_CONSOLE_LINES CONFIG_WEBSOCKET_CONSOLE_LINE_BUF_NUMBERS
38-
#define WS_CONSOLE_LINE_SIZE CONFIG_WEBSOCKET_CONSOLE_LINE_BUF_SIZE
39-
#define WS_CONSOLE_TIMEOUT K_MSEC(CONFIG_WEBSOCKET_CONSOLE_SEND_TIMEOUT)
40-
#define WS_CONSOLE_THRESHOLD CONFIG_WEBSOCKET_CONSOLE_SEND_THRESHOLD
34+
#define WS_CONSOLE_STACK_SIZE CONFIG_WEBSOCKET_CONSOLE_STACK_SIZE
35+
#define WS_CONSOLE_PRIORITY CONFIG_WEBSOCKET_CONSOLE_PRIO
36+
#define WS_CONSOLE_TIMEOUT K_MSEC(CONFIG_WEBSOCKET_CONSOLE_SEND_TIMEOUT)
37+
#define WS_CONSOLE_LINES CONFIG_WEBSOCKET_CONSOLE_LINE_BUF_NUMBERS
38+
#define WS_CONSOLE_LINE_SIZE CONFIG_WEBSOCKET_CONSOLE_LINE_BUF_SIZE
39+
#define WS_CONSOLE_TIMEOUT K_MSEC(CONFIG_WEBSOCKET_CONSOLE_SEND_TIMEOUT)
40+
#define WS_CONSOLE_THRESHOLD CONFIG_WEBSOCKET_CONSOLE_SEND_THRESHOLD
4141

42-
#define WS_CONSOLE_MIN_MSG 2
42+
#define WS_CONSOLE_MIN_MSG 2
4343

4444
/* These 2 structures below are used to store the console output
4545
* before sending it to the client. This is done to keep some
@@ -177,7 +177,7 @@ static int ws_console_out(int c)
177177
lb->buf[lb->len++] = (char)c;
178178

179179
if (c == '\n' || lb->len == WS_CONSOLE_LINE_SIZE - 1) {
180-
lb->buf[lb->len-1] = NVT_CR;
180+
lb->buf[lb->len - 1] = NVT_CR;
181181
lb->buf[lb->len++] = NVT_LF;
182182
ws_rb_switch();
183183
yield = true;
@@ -236,13 +236,13 @@ static inline void ws_handle_input(struct net_pkt *pkt)
236236
input->line[len] = NVT_NUL;
237237

238238
/* LF/CR will be removed if only the line is not NUL terminated */
239-
if (input->line[len-1] != NVT_NUL) {
240-
if (input->line[len-1] == NVT_LF) {
241-
input->line[len-1] = NVT_NUL;
239+
if (input->line[len - 1] != NVT_NUL) {
240+
if (input->line[len - 1] == NVT_LF) {
241+
input->line[len - 1] = NVT_NUL;
242242
}
243243

244-
if (input->line[len-2] == NVT_CR) {
245-
input->line[len-2] = NVT_NUL;
244+
if (input->line[len - 2] == NVT_CR) {
245+
input->line[len - 2] = NVT_NUL;
246246
}
247247
}
248248

0 commit comments

Comments
 (0)