nserver

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 6b81fc3f0da9205ebc65dfd00837831378a1982c
parent 6ada988a2f0877094e6749ca43878a86bf9a4ffb
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu, 16 Apr 2020 21:26:31 -0400

nserver: Update nserve.

* nserver/src/nserve.c (nserve): Fix calloc calls.

Diffstat:
nserver/src/nserve.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nserver/src/nserve.c b/nserver/src/nserve.c @@ -27,10 +27,10 @@ int barfsock(char *buf, size_t buf_sz, int sock) void nserve(int sock) { - char *out = (char *) calloc(sizeof(char), RSP_SIZE + 1); + char *out = (char *) calloc(RSP_SIZE + 1, sizeof(char)); check_mem(out); - char *cmd = (char *) calloc(sizeof(char), CMD_MAX_SIZE + 1); + char *cmd = (char *) calloc(CMD_MAX_SIZE + 1, sizeof(char)); check_mem(cmd); int rc = 0, done = 0;