chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
39883f6
)
execute: modernizations
author
Lennart Poettering
<lennart@poettering.net>
Wed, 19 Feb 2014 16:49:00 +0000
(17:49 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 19 Feb 2014 16:53:50 +0000
(17:53 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index 8bfe186c8a1d504c3da4631e37cb1ea999ab531e..f8b7521ff9ceb20b4a8f81b96036d40cb37c2e68 100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-1977,27
+1977,20
@@
void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
fprintf(f, "%s%s: %llu\n", prefix, rlimit_to_string(i), (unsigned long long) c->rlimit[i]->rlim_max);
if (c->ioprio_set) {
fprintf(f, "%s%s: %llu\n", prefix, rlimit_to_string(i), (unsigned long long) c->rlimit[i]->rlim_max);
if (c->ioprio_set) {
- char *class_str;
- int r;
+ _cleanup_free_ char *class_str = NULL;
- r = ioprio_class_to_string_alloc(IOPRIO_PRIO_CLASS(c->ioprio), &class_str);
- if (r < 0)
- class_str = NULL;
+ ioprio_class_to_string_alloc(IOPRIO_PRIO_CLASS(c->ioprio), &class_str);
fprintf(f,
"%sIOSchedulingClass: %s\n"
"%sIOPriority: %i\n",
prefix, strna(class_str),
prefix, (int) IOPRIO_PRIO_DATA(c->ioprio));
fprintf(f,
"%sIOSchedulingClass: %s\n"
"%sIOPriority: %i\n",
prefix, strna(class_str),
prefix, (int) IOPRIO_PRIO_DATA(c->ioprio));
- free(class_str);
}
if (c->cpu_sched_set) {
}
if (c->cpu_sched_set) {
- char *policy_str;
- int r;
+ _cleanup_free_ char *policy_str = NULL;
- r = sched_policy_to_string_alloc(c->cpu_sched_policy, &policy_str);
- if (r < 0)
- policy_str = NULL;
+ sched_policy_to_string_alloc(c->cpu_sched_policy, &policy_str);
fprintf(f,
"%sCPUSchedulingPolicy: %s\n"
"%sCPUSchedulingPriority: %i\n"
fprintf(f,
"%sCPUSchedulingPolicy: %s\n"
"%sCPUSchedulingPriority: %i\n"
@@
-2005,7
+1998,6
@@
void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
prefix, strna(policy_str),
prefix, c->cpu_sched_priority,
prefix, yes_no(c->cpu_sched_reset_on_fork));
prefix, strna(policy_str),
prefix, c->cpu_sched_priority,
prefix, yes_no(c->cpu_sched_reset_on_fork));
- free(policy_str);
}
if (c->cpuset) {
}
if (c->cpuset) {