Revised getpldh(.., ..) - no malloc's

This commit is contained in:
_
2018-04-06 14:42:52 -07:00
parent a188a19d77
commit 95ffa588b1
3 changed files with 33 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ char *loadfile(const char *fname, unsigned int *s) {
return buf;
}
bool unpackpld (const char *filedata,
/* bool unpackpld (const char *filedata,
unsigned int filesize,
const char *filename) {
bool status = false;
@@ -86,6 +86,16 @@ bool unpackpld (const char *filedata,
status = true;
}
return status;
} */
bool unpackpld(const char *filedata,
unsigned int filesize,
const char *filename) {
struct PldHeader h;
if (filedata != NULL && filesize > 0) {
getpldh(&h, filedata);
printpldh(&h);
}
}
int main(int argc, char ** argv) {