]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
nitpicks from lgtm.com
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 30 Nov 2018 13:57:30 +0000 (14:57 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 8 Jan 2019 12:06:32 +0000 (12:06 +0000)
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.

daemon/main.c
scripts/inet_pton.py [deleted file]

index eb1f1d53d9f877e18a690043ed7ac3efbebac8f3..15c7c1caea32c6a8af94c1aa7c9138b3a1944d96 100644 (file)
@@ -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);
                        }
diff --git a/scripts/inet_pton.py b/scripts/inet_pton.py
deleted file mode 100755 (executable)
index 6eea32a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/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("'"))