From 5217f876b082c871bd7946e874282cda9ad8a10e Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 4 Aug 2018 13:43:36 -0400 Subject: Do not free const string port --- chat.c | 5 ++--- 1 file 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 }, -- cgit 1.4.1 ever.1?id=021874674959883ce3dd9ac52b9b208b16d1578a'>tree commit diff
path: root/bin/man1/ever.1 (unfollow)
Commit message (Expand)Author
2020-10-27Switch gr alias back to git rebaseJune McEnroe
2020-10-27Allow cd host: to cd to same path over sshJune McEnroe
2020-10-27Use SendEnv for cd host:pathJune McEnroe
2020-10-27Allow cd host:path over sshJune McEnroe
2020-10-07Use mandoc -T utf8 for text.June McEnroe
2020-09-20Add The Awakened KingdomJune McEnroe
2020-09-12Move /opt/local back, cheat port select to use system manJune McEnroe
2020-09-12Move /opt/local behind /usr againJune McEnroe
2020-09-12Enable toc in cgit renderings of man pagesJune McEnroe
2020-09-11Install mandoc on macOSJune McEnroe
2020-09-11Rewrite install script yet againJune McEnroe
2020-09-11Remove NetBSD from install scriptJune McEnroe
2020-09-11Use MacPorts rather than pkgsrcJune McEnroe
2020-09-11Add debian VM name to sshJune McEnroe
2020-09-11Add influencer tweetJune McEnroe
2020-09-10Add The Kingdom of GodsJune McEnroe
2020-09-07Add SunglassesJune McEnroe
2020-09-06Add Between the BreathsJune McEnroe
2020-09-04Open /dev/tty in nudgeJune McEnroe
2020-09-04Add nudgeJune McEnroe
2020-09-03Build fbclock with -lzJune McEnroe
2020-08-29Add tweets from retweetsJune McEnroe