summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-04 13:43:36 -0400
committerJune McEnroe <june@causal.agency>2018-08-04 13:43:36 -0400
commit5217f876b082c871bd7946e874282cda9ad8a10e (patch)
tree850ef2a1f74d2a7b5cef70798d0f6b9cfc0bf670
parentSplit source into several files (diff)
downloadcatgirl-5217f876b082c871bd7946e874282cda9ad8a10e.tar.gz
catgirl-5217f876b082c871bd7946e874282cda9ad8a10e.zip
Do not free const string port
Diffstat (limited to '')
-rw-r--r--chat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/chat.c b/chat.c
index 39a0679..dc45312 100644
--- a/chat.c
+++ b/chat.c
@@ -46,7 +46,7 @@ char *prompt(const char *prompt) {
 
 int main(int argc, char *argv[]) {
 	char *host = NULL;
-	char *port = "6697";
+	const char *port = "6697";
 	const char *webPass = NULL;
 
 	int opt;
@@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {
 			break; case 'h': host = strdup(optarg);
 			break; case 'j': chat.chan = strdup(optarg);
 			break; case 'n': chat.nick = strdup(optarg);
-			break; case 'p': port = strdup(optarg);
+			break; case 'p': port = optarg;
 			break; case 'v': chat.verbose = true;
 			break; case 'w': webPass = optarg;
 			break; default:  return EX_USAGE;
@@ -73,7 +73,6 @@ int main(int argc, char *argv[]) {
 
 	int sock = clientConnect(host, port, webPass);
 	free(host);
-	free(port);
 
 	struct pollfd fds[2] = {
 		{ .fd = STDIN_FILENO, .events = POLLIN },
a9423df6223f3cc28d56d0f751158c&follow=1'>Duplicate effective URL before passing it back to curlJune McEnroe Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable. 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe Wow. One of the best I've read. 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe Broke out LDLIBS for each bin, and made everything more uniform. 2020-01-28Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe