mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 04:03:56 +00:00
[LOG2LINES] Optimize malloc() calls.
This commit is contained in:
parent
dbaa875f05
commit
ca2bb9ee28
1 changed files with 4 additions and 4 deletions
|
@ -96,7 +96,7 @@ int optionInit(int argc, const char **argv)
|
|||
strcpy(opt_logFile, argv[i+1]);
|
||||
break;
|
||||
case 'P':
|
||||
free(opt_Pipe);
|
||||
if (!opt_Pipe)
|
||||
opt_Pipe = malloc(LINESIZE);
|
||||
strcpy(opt_Pipe, argv[i+1]);
|
||||
break;
|
||||
|
@ -166,7 +166,7 @@ int optionParse(int argc, const char **argv)
|
|||
break;
|
||||
case 'R':
|
||||
optCount++;
|
||||
free(opt_Revision);
|
||||
if (!opt_Revision)
|
||||
opt_Revision = malloc(LINESIZE);
|
||||
sscanf(optarg, "%s", opt_Revision);
|
||||
if (strcmp(opt_Revision, "check") == 0)
|
||||
|
|
Loading…
Reference in a new issue