From 1c88e827add08ffd258f1c37196d78e50edaa488 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 30 Jul 2021 04:45:32 +1000 Subject: Remove useless memset()s. --- src/sledjchisl/sledjchisl.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/sledjchisl/sledjchisl.c') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index fb2d9bc..cfa1246 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -4495,7 +4495,6 @@ T(c); E("tmux load iar command failed!"); else { -// memset(toybuf, 0, sizeof(toybuf)); // snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", name); // waitTmuxText(name, toybuf); // I("%s is done starting up.", name); @@ -7672,7 +7671,6 @@ fcgiDone: { // Join the session. doTmuxCmd("select-window -t '%s' \\; attach-session -t '%s'", Tconsole, Tconsole); -// memset(toybuf, 0, sizeof(toybuf)); // snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole); // i = system(toybuf); // if (!WIFEXITED(i)) @@ -7692,7 +7690,6 @@ sims = -- Note these are .shini / tmux tab short names. {["type"] = "Heavies"; ["number"] = 18; "DP", "ARSE"}, } */ - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "%s/sims.lua", scEtc); if (0 == lstat(toybuf, &st)) { @@ -7768,7 +7765,6 @@ sims = -- Note these are .shini / tmux tab short names. { int cont = TRUE; - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "%s.shini", nm); if ( @@ -7779,11 +7775,9 @@ sims = -- Note these are .shini / tmux tab short names. (strcmp(target, toybuf) == 0) ) cont = FALSE; - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "%s.ini", nm); if (strcmp(target, toybuf) == 0) cont = FALSE; - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "sim%d.ini", count); if (strcmp(target, toybuf) == 0) cont = FALSE; @@ -7800,7 +7794,6 @@ sims = -- Note these are .shini / tmux tab short names. char *path = xmprintf("%s/%s.shini", scEtc, nm); char *newPath = xmprintf("%s/sim%d/%s.ini", scTemp, count, nm); // Coz OpenSim. - memset(toybuf, 0, sizeof(toybuf)); if (0 == panes) doTmuxCmd("split-window -hp 50 -d -t '%s:0.1'", Tconsole); else if (0 == pane) @@ -7881,12 +7874,10 @@ Is there a "switch to pane 1" command? Nope cmd = xmprintf("%d.%d", simd->window, simd->pane); doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, cmd, nm); { - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "mono OpenSim.exe -inidirectory=%s/sim%d", scTemp, count); sendTmuxCmd(cmd, toybuf); if (0 == doWait) { - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", name); waitTmuxText(cmd, toybuf); I("%s is done starting up.", name); @@ -7920,7 +7911,6 @@ Is there a "switch to pane 1" command? Nope curtime = tv.tv_sec; strftime(date, DATE_TIME_LEN, "%F_%T", localtime(&curtime)); I("%s is being backed up to %s/backups/%s-%s.oar.", name, scRoot, nm, date); - memset(toybuf, 0, sizeof(toybuf)); snprintf(toybuf, sizeof(toybuf), "save oar --all %s/backups/%s-%s.oar", scRoot, nm, date); sendTmuxCmd(cmd, toybuf); // if (0 == doWait) -- cgit v1.1