YARN-11055. Add missing newline in cgroups-operations.c (#3851)

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit a94e9fcbde)
This commit is contained in:
Gera Shegalov 2022-01-16 23:20:48 -08:00 committed by Akira Ajisaka
parent b5e7f59e53
commit 6c58f83b78
1 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ int update_cgroups_parameters(
if (!full_path) { if (!full_path) {
fprintf(ERRORFILE, fprintf(ERRORFILE,
"Failed to get cgroups path to write, it should be a configuration issue"); "Failed to get cgroups path to write, it should be a configuration issue\n");
failure = 1; failure = 1;
goto cleanup; goto cleanup;
} }
@ -127,7 +127,7 @@ int update_cgroups_parameters(
// Make sure file exists // Make sure file exists
struct stat sb; struct stat sb;
if (stat(full_path, &sb) != 0) { if (stat(full_path, &sb) != 0) {
fprintf(ERRORFILE, "CGroups: Could not find file to write, %s", full_path); fprintf(ERRORFILE, "CGroups: Could not find file to write, %s\n", full_path);
failure = 1; failure = 1;
goto cleanup; goto cleanup;
} }
@ -139,18 +139,18 @@ int update_cgroups_parameters(
FILE *f; FILE *f;
f = fopen(full_path, "a"); f = fopen(full_path, "a");
if (!f) { if (!f) {
fprintf(ERRORFILE, "CGroups: Failed to open cgroups file, %s", full_path); fprintf(ERRORFILE, "CGroups: Failed to open cgroups file, %s\n", full_path);
failure = 1; failure = 1;
goto cleanup; goto cleanup;
} }
if (fprintf(f, "%s", value) < 0) { if (fprintf(f, "%s", value) < 0) {
fprintf(ERRORFILE, "CGroups: Failed to write cgroups file, %s", full_path); fprintf(ERRORFILE, "CGroups: Failed to write cgroups file, %s\n", full_path);
fclose(f); fclose(f);
failure = 1; failure = 1;
goto cleanup; goto cleanup;
} }
if (fclose(f) != 0) { if (fclose(f) != 0) {
fprintf(ERRORFILE, "CGroups: Failed to close cgroups file, %s", full_path); fprintf(ERRORFILE, "CGroups: Failed to close cgroups file, %s\n", full_path);
failure = 1; failure = 1;
goto cleanup; goto cleanup;
} }