Stop using x86-isms and use ISO C (oversized shifts are undefined).
authorPierre Ossman <ossman@cendio.se>
Thu, 14 Sep 2006 16:00:57 +0000 (16:00 +0000)
committerPierre Ossman <ossman@cendio.se>
Thu, 14 Sep 2006 16:00:57 +0000 (16:00 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1397 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/utils/padsp.c

index d947f69..c7bfe5a 100644 (file)
@@ -1879,7 +1879,7 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
             
             pa_threaded_mainloop_lock(i->mainloop);
             
-            i->fragment_size = 1 << (*(int*) argp);
+            i->fragment_size = 1 << ((*(int*) argp) & 31);
             i->n_fragments = (*(int*) argp) >> 16;
 
             /* 0x7FFF means that we can set whatever we like */