summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-03-19 13:59:16 +0100
committerColin Guthrie <cguthrie@mandriva.org>2011-03-20 11:29:25 +0000
commit7c011e7688f1eddeee7636f1bbec11769315135e (patch)
tree72145bd4aa51bb5fbfd29c4a2ac2378864b5dbe5 /src/pulsecore
parent33a88fbfdee773b1473cb5339540d79809363bdc (diff)
Get rid of some warnings: -Wunsafe-loop-optimizations
pulsecore/core-util.c: In function ‘pa_hexstr’: pulsecore/core-util.c:1858: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_decibel_fix_dump’: modules/alsa/alsa-mixer.c:3678: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations] modules/alsa/alsa-mixer.c: In function ‘pa_alsa_path_set_new’: modules/alsa/alsa-mixer.c:2640: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/core-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 13d0bb5e..3eb12428 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1823,7 +1823,7 @@ char *pa_hexstr(const uint8_t* d, size_t dlength, char *s, size_t slength) {
pa_assert(s);
pa_assert(slength > 0);
- while (i < dlength && j+3 <= slength) {
+ while (j+2 < slength && i < dlength) {
s[j++] = hex[*d >> 4];
s[j++] = hex[*d & 0xF];