summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/network.c1
-rw-r--r--src/fe-common/core/completion.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 8abc1ba1..76659f3e 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -390,6 +390,7 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_ADDRCONFIG;
/* save error to host_error for later use */
ret = getaddrinfo(addr, NULL, &hints, &ailist);
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index a4715d23..1e7833a4 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -217,6 +217,11 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
want_space = TRUE;
signal_emit("complete word", 5, &complist, window, word, linestart, &want_space);
last_want_space = want_space;
+
+ if (complist != NULL) {
+ /* Remove all nulls (from the signal) before doing further processing */
+ complist = g_list_remove_all(g_list_first(complist), NULL);
+ }
}
g_free(linestart);