Recently Written · git

sacc

Mirror of git://bitreich.org/sacc, the sacc gopher client from bitreich.org.

git clone https://github.com/equwal/sacc

Log | Files | Refs


commit 5c2c788d7cda17dfadca2d12738792be1b140387
Quentin Rameau <quinq@fifth.space>
2021-11-09 00:14:12 +0100

Remove unused variable / labels

 sacc.c  | 11 +++++------
 ui_ti.c |  2 --
 2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/sacc.c b/sacc.c
index ef50ecf..aee0a9b 100644
--- a/sacc.c
+++ b/sacc.c
@@ -419,14 +419,13 @@ static Dir *
 molddiritem(char *raw)
 {
 	Item *item, *items = NULL;
-	char *s, *nl, *p;
+	char *nl, *p;
 	Dir *dir;
 	size_t i, n, nitems;
 
-	for (s = nl = raw, nitems = 0; p = strchr(nl, '\n'); ++nitems) {
-		s = nl;
-		nl = p+1;
-	}
+	for (nl = raw, nitems = 0; p = strchr(nl, '\n'); nl = p+1)
+		++nitems;
+
 	if (!nitems) {
 		diag("Couldn't parse dir item");
 		return NULL;
@@ -531,7 +530,7 @@ connectto(const char *host, const char *port, struct cnx *c)
 	    .ai_protocol = IPPROTO_TCP,
 	};
 	struct addrinfo *addrs, *ai;
-	int r, err, conn;
+	int r, err;
 
 	sigemptyset(&set);
 	sigaddset(&set, SIGWINCH);
diff --git a/ui_ti.c b/ui_ti.c
index 0f54802..a71571d 100644
--- a/ui_ti.c
+++ b/ui_ti.c
@@ -505,7 +505,6 @@ uiselectitem(Item *entry)
 			jumptoline(entry, 0, 0);
 			continue;
 		case _key_search:
-		search:
 			free(searchstr);
 			if (!((searchstr = uiprompt("Search for: ")) &&
 			    searchstr[0])) {
@@ -523,7 +522,6 @@ uiselectitem(Item *entry)
 		quit:
 			return NULL;
 		case _key_fetch:
-		fetch:
 			if (entry->raw)
 				continue;
 			return entry;