t* sacc + cursorline and uri preview URI git clone git://git.codevoid.de/sacc-sdk DIR Log DIR Files DIR Refs DIR LICENSE --- DIR commit 2a13823f55fd273d3013e685e8d830f6109daecf DIR parent 44c1aa9c14645f97bd6fbf45ed16c4811eef4af3 URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de> Date: Tue, 21 Aug 2018 22:58:06 +0200 Silence warnings, display URI per default Diffstat: M sacc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- DIR diff --git a/sacc.c b/sacc.c t@@ -191,7 +191,7 @@ clearitem(Item *item) if (!item) return; - if (dir = item->dat) { + if ((dir = item->dat)) { items = dir->items; for (i = 0; i < dir->nitems; ++i) clearitem(&items[i]); t@@ -359,7 +359,7 @@ molddiritem(char *raw) Dir *dir; size_t i, n, nitems; - for (s = nl = raw, nitems = 0; p = strchr(nl, '\n'); ++nitems) { + for (s = nl = raw, nitems = 0; (p = strchr(nl, '\n')); ++nitems) { s = nl; nl = p+1; } t@@ -458,7 +458,7 @@ connectto(const char *host, const char *port) struct addrinfo *addrs, *addr; int sock, r; - if (r = getaddrinfo(host, port, &hints, &addrs)) { + if ((r = getaddrinfo(host, port, &hints, &addrs))) { diag("Can't resolve hostname \"%s\": %s", host, gai_strerror(r)); return -1; t@@ -531,7 +531,7 @@ downloaditem(Item *item) mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP; int dest; - if (file = strrchr(item->selector, '/')) + if ((file = strrchr(item->selector, '/'))) ++file; else file = item->selector; t@@ -542,7 +542,7 @@ downloaditem(Item *item) if (!path[0]) path = xstrdup(file); - if (tag = item->tag) { + if ((tag = item->tag)) { if (access(tag, R_OK) < 0) { clear(&item->tag); } else if (!strcmp(tag, path)) { t@@ -612,7 +612,7 @@ plumbitem(Item *item) mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP; int n, dest, plumbitem; - if (file = strrchr(item->selector, '/')) + if ((file = strrchr(item->selector, '/'))) ++file; else file = item->selector; t@@ -860,7 +860,7 @@ moldentry(char *url) char *p, *host = url, *port = "70", *gopherpath = "1"; int parsed, ipv6; - if (p = strstr(url, "://")) { + if ((p = strstr(url, "://"))) { if (strncmp(url, "gopher", p - url)) die("Protocol not supported: %.*s", p - url, url); host = p + 3; t@@ -956,7 +956,7 @@ setup(void) if (mkdir(tmpdir, S_IRWXU) < 0 && errno != EEXIST) die("mkdir: %s: %s", tmpdir, strerror(errno)); - if(interactive = isatty(1)) { + if((interactive = isatty(1))) { uisetup(); sa.sa_handler = uisigwinch; sigaction(SIGWINCH, &sa, NULL);