circo

claudio's IRC oasis
git clone git://git.bitsmanent.org/circo
Log | Files | Refs | README | LICENSE

commit e4df314f01700dcd8d374436d0057c8494a70023
parent f674ae705ca5abc363163764ce22a4632655bacf
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Tue, 20 Dec 2022 23:36:29 +0100

die() don't need newline from 26773aca

Diffstat:
Mcirco.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/circo.c b/circo.c @@ -767,7 +767,6 @@ die(const char *fmt, ...) { exit(0); } - void draw(void) { printf(CURSOFF); @@ -920,7 +919,7 @@ ecalloc(size_t nmemb, size_t size) { void *p; if(!(p = calloc(nmemb, size))) - die("Cannot allocate memory.\n"); + die("Cannot allocate memory."); return p; } @@ -1111,7 +1110,7 @@ histpush(char *buf, int len) { ++sel->histsz; i = sel->histsz; if(!(sel->hist = realloc(sel->hist, (sel->histsz += len + 1)))) - die("Cannot realloc\n"); + die("Cannot realloc"); memcpy(&sel->hist[i], buf, len); sel->hist[i + len] = '\0'; } @@ -1529,7 +1528,7 @@ run(void) { if(n < 0) { if(errno == EINTR) continue; - die("select()\n"); + die("select()"); } if(n == 0) { if(srv) { @@ -1705,7 +1704,7 @@ uiset(char *buf, int index) { void usage(void) { - die("Usage: %s [-v] [-hpnl <arg>]\n", argv0); + die("Usage: %s [-v] [-hpnl <arg>]", argv0); } void @@ -1784,7 +1783,7 @@ main(int argc, char *argv[]) { case 'p': strncpy(port, EARGF(usage()), sizeof port); break; case 'n': strncpy(nick, EARGF(usage()), sizeof nick); break; case 'l': strncpy(logfile, EARGF(usage()), sizeof logfile); break; - case 'v': die("circo-"VERSION"\n"); + case 'v': die("circo-"VERSION); default: usage(); } ARGEND;