Skip to content

Commit

Permalink
YARN-11055. Add missing newline in cgroups-operations.c (#3851)
Browse files Browse the repository at this point in the history
Signed-off-by: Akira Ajisaka <[email protected]>
(cherry picked from commit a94e9fc)
  • Loading branch information
gerashegalov authored and aajisaka committed Jan 17, 2022
1 parent b5e7f59 commit 6c58f83
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int update_cgroups_parameters(

if (!full_path) {
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;
goto cleanup;
}
Expand All @@ -127,7 +127,7 @@ int update_cgroups_parameters(
// Make sure file exists
struct stat sb;
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;
goto cleanup;
}
Expand All @@ -139,18 +139,18 @@ int update_cgroups_parameters(
FILE *f;
f = fopen(full_path, "a");
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;
goto cleanup;
}
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);
failure = 1;
goto cleanup;
}
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;
goto cleanup;
}
Expand Down

0 comments on commit 6c58f83

Please sign in to comment.