Commit 4cde7a30 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Tomas Krizek

nitpicks from lgtm.com

The script has been unused for longer time.
Almost all remaining C warnings are just "FIXME" comments :-)
and I didn't touch the JS warnings.
parent 647803b3
......@@ -451,7 +451,7 @@ static int run_worker(uv_loop_t *loop, struct engine *engine, fd_array_t *ipc_se
pipe_ret = uv_pipe_open(&pipe, args->control_fd);
} else {
(void) mkdir("tty", S_IRWXU|S_IRWXG);
sock_file = afmt("tty/%ld", getpid());
sock_file = afmt("tty/%ld", (long)getpid());
if (sock_file) {
pipe_ret = uv_pipe_bind(&pipe, sock_file);
}
......
#!/usr/bin/env python3
"""
Print IP address to binary representation in Python hex format \x12
"""
from socket import inet_pton, AF_INET6, AF_INET
import sys
from binascii import hexlify
try:
arg = sys.argv[1]
except:
sys.exit('Usage: inet_pton.py <IPv4 or IPv6 address>')
if ':' in arg:
addr_type = AF_INET6
else:
addr_type = AF_INET
print(repr(inet_pton(addr_type, arg)).strip("'"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment