diff --git a/ESP32/console_esp32.cpp b/ESP32/console_esp32.cpp index f751f75..a925f97 100644 --- a/ESP32/console_esp32.cpp +++ b/ESP32/console_esp32.cpp @@ -32,7 +32,6 @@ int console_esp32::wait_for_char_ll(const short timeout) return port->read(); } -// delay(10); vTaskDelay(10 / portTICK_PERIOD_MS); } diff --git a/console_posix.cpp b/console_posix.cpp index 02f7a13..0996dda 100644 --- a/console_posix.cpp +++ b/console_posix.cpp @@ -22,7 +22,7 @@ console_posix::console_posix(std::atomic_uint32_t *const stop_event): console(st if (tcgetattr(STDIN_FILENO, &org_tty_opts) == -1) error_exit(true, "console_posix: tcgetattr failed"); - struct termios tty_opts_raw { 0 }; + struct termios tty_opts_raw { }; cfmakeraw(&tty_opts_raw); if (tcsetattr(STDIN_FILENO, TCSANOW, &tty_opts_raw) == -1) diff --git a/console_posix.h b/console_posix.h index aabf323..6d8c2cc 100644 --- a/console_posix.h +++ b/console_posix.h @@ -12,7 +12,7 @@ class console_posix : public console { private: #if !defined(_WIN32) - struct termios org_tty_opts { 0 }; + struct termios org_tty_opts { }; #endif protected: diff --git a/disk_backend_nbd.cpp b/disk_backend_nbd.cpp index 9ba9971..24ea78f 100644 --- a/disk_backend_nbd.cpp +++ b/disk_backend_nbd.cpp @@ -93,7 +93,7 @@ bool disk_backend_nbd::connect(const bool retry) // LOOP until connected, logging message, exponential backoff? addrinfo *res = nullptr; - addrinfo hints { 0 }; + addrinfo hints { }; hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; diff --git a/log.cpp b/log.cpp index be15d74..8a85fbe 100644 --- a/log.cpp +++ b/log.cpp @@ -183,7 +183,7 @@ void dolog(const log_level_t ll, const char *fmt, ...) #endif time_t t_now = now / 1000000; - tm tm { 0 }; + tm tm { }; #if defined(_WIN32) tm = *localtime(&t_now); #else diff --git a/utils.cpp b/utils.cpp index b6c70f1..9d21de7 100644 --- a/utils.cpp +++ b/utils.cpp @@ -261,7 +261,7 @@ void set_nodelay(const int fd) std::string get_endpoint_name(const int fd) { - sockaddr_in addr { 0 }; + sockaddr_in addr { }; socklen_t addr_len = sizeof addr; if (getpeername(fd, reinterpret_cast(&addr), &addr_len) == -1)