mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-12-05 21:27:13 -06:00
tweaks
This commit is contained in:
6
main.c
6
main.c
@@ -217,7 +217,7 @@ static void *dowork(void *task)
|
||||
memcpy(hashsrc,checksumstr,checksumstrlen);
|
||||
hashsrc[checksumstrlen + PUBLIC_LEN] = 0x03; // version
|
||||
|
||||
sname = malloc(workdirlen + ONIONLEN + 63 + 1);
|
||||
sname = (char *) malloc(workdirlen + ONIONLEN + 63 + 1);
|
||||
if (!sname)
|
||||
abort();
|
||||
if (workdir)
|
||||
@@ -326,7 +326,7 @@ static void *dofastwork(void *task)
|
||||
memcpy(hashsrc,checksumstr,checksumstrlen);
|
||||
hashsrc[checksumstrlen + PUBLIC_LEN] = 0x03; // version
|
||||
|
||||
sname = malloc(workdirlen + ONIONLEN + 63 + 1);
|
||||
sname = (char *) malloc(workdirlen + ONIONLEN + 63 + 1);
|
||||
if (!sname)
|
||||
abort();
|
||||
if (workdir)
|
||||
@@ -463,7 +463,7 @@ static void setworkdir(const char *wd)
|
||||
unsigned needslash = 0;
|
||||
if (wd[l-1] != '/')
|
||||
needslash = 1;
|
||||
char *s = malloc(l + needslash + 1);
|
||||
char *s = (char *) malloc(l + needslash + 1);
|
||||
if (!s)
|
||||
abort();
|
||||
memcpy(s,wd,l);
|
||||
|
||||
Reference in New Issue
Block a user