diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index 7af1bb0cb20e1ca8d3a09823654fe54e042575b3..dbc01cfe2b6ee201f175823645b697bd769c744d 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -234,12 +234,10 @@ static void do_output_subblock(Real144_internal *glob, const unsigned short  *gs
 static int dec1(signed short *decsp, const int *data, const int *inp,
                  int f)
 {
-    short *ptr,*end;
-
-    end = (ptr = decsp) + 30;
+    int i;
 
-    while (ptr < end)
-        *(ptr++) = *(inp++);
+    for (i=0; i<30; i++)
+        *(decsp++) = *(inp++);
 
     return rms(data, f);
 }