mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 11:35:35 +03:00
Use const where applicable
This commit is contained in:
parent
413b9a4b00
commit
97724ae528
@ -23,7 +23,7 @@ static os_log_t logger;
|
||||
logger = os_log_create("com.qvacua.VimR", "general");
|
||||
});
|
||||
|
||||
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
const int sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sock < 0) {
|
||||
os_log_error(logger, "Could not open socket");
|
||||
return 0;
|
||||
@ -57,7 +57,7 @@ static os_log_t logger;
|
||||
return 0;
|
||||
}
|
||||
|
||||
in_port_t result = ntohs(sin.sin_port);
|
||||
const in_port_t result = ntohs(sin.sin_port);
|
||||
|
||||
if (close(sock) < 0) {
|
||||
os_log_error(logger, "socket did not close: %{public}s", strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user