clean-up
This commit is contained in:
parent
9a858fbe7a
commit
f3cbf79bd9
6 changed files with 5 additions and 6 deletions
|
@ -32,7 +32,6 @@ int console_esp32::wait_for_char_ll(const short timeout)
|
|||
return port->read();
|
||||
}
|
||||
|
||||
// delay(10);
|
||||
vTaskDelay(10 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
2
log.cpp
2
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
|
||||
|
|
|
@ -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<sockaddr *>(&addr), &addr_len) == -1)
|
||||
|
|
Loading…
Add table
Reference in a new issue