aboutsummaryrefslogtreecommitdiff
path: root/main/sockbuf.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-01 22:44:20 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-01 22:44:20 -0700
commit10a5077234e9b76dc100b9029a9e2d71801e7242 (patch)
tree13e42a3c91f1672c6ce7b6daba776366aa71ef85 /main/sockbuf.c
parent05e3f6bb7293c771629c7b3599392c8f335e7dd8 (diff)
downloadesp32-ws2812b-main.tar.gz
esp32-ws2812b-main.tar.bz2
esp32-ws2812b-main.zip
Run clang-formatHEADmain
Diffstat (limited to 'main/sockbuf.c')
-rw-r--r--main/sockbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/sockbuf.c b/main/sockbuf.c
index 0fede63..5b88393 100644
--- a/main/sockbuf.c
+++ b/main/sockbuf.c
@@ -1,7 +1,7 @@
#include "sockbuf.h"
-#include <unistd.h>
#include <string.h>
+#include <unistd.h>
void sockbuf_write(sockbuf_t* sockbuf, const char* value)
{
@@ -21,7 +21,7 @@ int peek_char(sockbuf_t* sockbuf)
if (sockbuf->next == sockbuf->last) {
sockbuf->next = 0;
int size = read(sockbuf->socket, sockbuf->buf, sizeof(sockbuf->buf));
- sockbuf->last = (uint8_t) size;
+ sockbuf->last = (uint8_t)size;
if (size <= 0) {
return size - 1;
@@ -36,7 +36,7 @@ int get_char(sockbuf_t* sockbuf)
int ret = peek_char(sockbuf);
if (ret >= 0) {
- sockbuf->next ++;
+ sockbuf->next++;
}
return ret;