Skip to content

Commit

Permalink
system/composite_main.c: Convert fprintf -> dprintf
Browse files Browse the repository at this point in the history
CONFIG_FILE_STREAMS now defaults to 'n' when DEFAULT_SMALL is enabled. This
is a good change, but this source file fails to compile when file streams
are disabled.

Fix this by using dprintf.
  • Loading branch information
pussuw authored and pkarashchenko committed Apr 3, 2023
1 parent 9310556 commit c694d8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions system/composite/composite_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ int main(int argc, FAR char *argv[])

if (g_composite.cmphandle)
{
fprintf(stderr, "conn_main: ERROR: Already connected\n");
dprintf(STDERR_FILENO, "conn_main: ERROR: Already connected\n");
return 1;
}

Expand All @@ -410,7 +410,8 @@ int main(int argc, FAR char *argv[])
}
else if (argc > 2)
{
fprintf(stderr, "conn_main: ERROR: Too many arguments: %d\n", argc);
dprintf(STDERR_FILENO, "conn_main: ERROR: Too many arguments: %d\n",
argc);
return EXIT_FAILURE;
}

Expand Down Expand Up @@ -513,7 +514,7 @@ int disconn_main(int argc, char *argv[])

if (!g_composite.cmphandle)
{
fprintf(stderr, "disconn_main: ERROR: Not connected\n");
dprintf(STDERR_FILENO, "disconn_main: ERROR: Not connected\n");
return 1;
}

Expand All @@ -527,7 +528,8 @@ int disconn_main(int argc, char *argv[])
}
else if (argc > 2)
{
fprintf(stderr, "conn_main: ERROR: Too many arguments: %d\n", argc);
dprintf(STDERR_FILENO, "conn_main: ERROR: Too many arguments: %d\n",
argc);
return EXIT_FAILURE;
}

Expand Down

0 comments on commit c694d8d

Please sign in to comment.