Skip to content

Commit

Permalink
convert(): use the elegant realloc() call
Browse files Browse the repository at this point in the history
Instead of doing a poor man's realloc(), we can call the real thing ;-)

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Feb 14, 2017
1 parent ba057ef commit 903eac5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions winsup/cygwin/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3466,8 +3466,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
{
return ((char *)arg);
}
arg_result = (char *)malloc (strlen (stack_path)+1);
strcpy (arg_result, stack_path);
arg_result = (char *)realloc (stack_path, strlen (stack_path)+1);
// Windows doesn't like empty entries in PATH env. variables (;;)
char* semisemi = strstr(arg_result, ";;");
while (semisemi)
Expand Down

0 comments on commit 903eac5

Please sign in to comment.