about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 },
r-highlight'> I did not realize this syntax was so powerful. 2017-07-31Show other clients' cursorsJune McEnroe Also unfuck removing on send failure. 2017-07-31Perform enter as two moves rather than a loopJune McEnroe 2017-07-31Track tile access countsJune McEnroe 2017-07-31Adjust move speed in clientJune McEnroe 2017-07-31Handle large movesJune McEnroe 2017-07-30Optimize builds for chrootJune McEnroe 2017-07-30Persist bright across color changesJune McEnroe 2017-07-30Add index.htmlJune McEnroe 2017-07-30Add snapshot.shJune McEnroe 2017-07-30Fix termcap patch for background colorsJune McEnroe 2017-07-30Update helpJune McEnroe 2017-07-30Fix help to track colorJune McEnroe 2017-07-30Support background colorsJune McEnroe 2017-07-30Track color only client-sideJune McEnroe 2017-07-30Add ostensible support for background colorsJune McEnroe 2017-07-30Add tile create and access timestampsJune McEnroe 2017-07-30Assert stable struct Tile field offsetsJune McEnroe 2017-07-30Add chroot.shJune McEnroe 2017-07-30Add ` commandJune McEnroe 2017-07-30Add sshd_configJune McEnroe 2017-07-30Add termcap patchJune McEnroe