mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
tools/mkdeps.c: Fix error in calculation of the length of the command
This commit is contained in:
+3
-2
@@ -663,7 +663,9 @@ static void do_dependency(const char *file)
|
|||||||
{
|
{
|
||||||
const char *expanded;
|
const char *expanded;
|
||||||
|
|
||||||
cmdlen += strlen(g_cflags);
|
expanded = do_expand(g_cflags);
|
||||||
|
cmdlen += strlen(expanded);
|
||||||
|
|
||||||
if (cmdlen >= MAX_BUFFER)
|
if (cmdlen >= MAX_BUFFER)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: CFLAG string is too long [%d/%d]: %s\n",
|
fprintf(stderr, "ERROR: CFLAG string is too long [%d/%d]: %s\n",
|
||||||
@@ -671,7 +673,6 @@ static void do_dependency(const char *file)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
expanded = do_expand(g_cflags);
|
|
||||||
strcat(g_command, expanded);
|
strcat(g_command, expanded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user