diff options
author | Scott Reeves <sreeves@novell.com> | 2011-01-20 16:41:21 -0700 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2011-01-23 14:10:49 +0000 |
commit | a509f10f95448fbbd209f2b4903b7c5441886711 (patch) | |
tree | f5ee71cd1a7fc5ddd90a6770a477b0fe0130b34e /src/pulsecore/core-util.c | |
parent | 98bde37a513bf655a3f2868880c941a19509987d (diff) |
Core: Fix incorrect check of return value
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r-- | src/pulsecore/core-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index effc598e..4e7d0d71 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -680,7 +680,7 @@ int pa_make_realtime(int rtprio) { } for (p = rtprio-1; p >= 1; p--) - if (set_scheduler(p)) { + if (set_scheduler(p) >= 0) { pa_log_info("Successfully enabled SCHED_RR scheduling for thread, with priority %i, which is lower than the requested %i.", p, rtprio); return 0; } @@ -750,7 +750,7 @@ int pa_raise_priority(int nice_level) { } for (n = nice_level+1; n < 0; n++) - if (set_nice(n) > 0) { + if (set_nice(n) >= 0) { pa_log_info("Successfully acquired nice level %i, which is lower than the requested %i.", n, nice_level); return 0; } |