From d97fd1a57f2ee8f0a00b653f045685de73d83cd4 Mon Sep 17 00:00:00 2001 From: Bryan Stansell Date: Wed, 13 Feb 2019 23:30:24 -0800 Subject: [PATCH] Fix #6 - clang "-Wstring-plus-int" warning --- conserver/master.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/conserver/master.c b/conserver/master.c index 97ed6fc..1fc8826 100644 --- a/conserver/master.c +++ b/conserver/master.c @@ -560,10 +560,13 @@ DoNormalRead(CONSCLIENT *pCLServing) if (iSep >= 0) { if (config->redirect == FLAGTRUE) { REMOTE *pRC; + char *s; for (pRC = pRCUniq; (REMOTE *)0 != pRC; pRC = pRC->pRCuniq) { + s = ":@%s"; + s += iSep; FilePrint(pCLServing->fd, FLAGTRUE, - ":@%s" + iSep, pRC->rhost); + s, pRC->rhost); iSep = 0; } } @@ -642,12 +645,14 @@ DoNormalRead(CONSCLIENT *pCLServing) strcmp(pcCmd, "groups") == 0) { int iSep = 1; GRPENT *pGE; + char *s; for (pGE = pGroups; pGE != (GRPENT *)0; pGE = pGE->pGEnext) { if (0 == pGE->imembers) continue; - FilePrint(pCLServing->fd, FLAGTRUE, ":%hu" + iSep, - pGE->port); + s = ":%hu"; + s += iSep; + FilePrint(pCLServing->fd, FLAGTRUE, s, pGE->port); iSep = 0; } FileWrite(pCLServing->fd, FLAGFALSE, "\r\n", 2);