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.0 56da628a55245403584d8f6c63af9c6ebbc6d5'>tree commit diff
path: root/bin/LICENSE (unfollow)
Commit message (Expand)Author
2021-02-04Warn twice about stopped jobsJune McEnroe
2021-02-04Remove cgit logo using cgitrcJune McEnroe
2021-01-31Add The Rosewater RedemptionJune McEnroe
2021-01-29Use int when checking for EOFJune McEnroe
2021-01-28Move gpl.c and agpl.c templates out of etcJune McEnroe
2021-01-27Set para and sect for mdocJune McEnroe
2021-01-26Use First state to match keyword at beginning of lineJune McEnroe
2021-01-25Install vi on Linux and nvi on macOSJune McEnroe
2021-01-25Use vi and lessJune McEnroe
2021-01-20Use mtags for sh in source-filterJune McEnroe
2021-01-20Generate tags for sh files in mtagsJune McEnroe
2021-01-20Add messy sh lexerJune McEnroe
2021-01-20Add all target to git.causal.agency MakefileJune McEnroe
2021-01-20Remove Lua supportJune McEnroe
2021-01-20Fix tests for diff spansJune McEnroe
2021-01-20Avoid matching ':' in make tagsJune McEnroe
2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe
2021-01-19Escape \ and / in mtags search patternsJune McEnroe
2021-01-20Use mtags in source-filterJune McEnroe
2021-01-19Add mtags to generate tags for make and mdocJune McEnroe
2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe
2021-01-19Don't use a pager if reading standard inputJune McEnroe
2021-01-19Support BSD make syntax and match *.amJune McEnroe
2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe
2021-01-18Allow matching lexers using first input lineJune McEnroe