1
1
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:
Tae Won Ha 2019-03-17 23:53:17 +01:00
parent 413b9a4b00
commit 97724ae528
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -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));