]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] arc4.c compile fix for older gcc's
authorAndrew Morton <akpm@osdl.org>
Sun, 7 Mar 2004 00:02:47 +0000 (16:02 -0800)
committerJens Axboe <axboe@suse.de>
Sun, 7 Mar 2004 00:02:47 +0000 (16:02 -0800)
Declarations come before statements, please.

Current gcc warns about this too, bless them:

crypto/arc4.c: In function `arc4_crypt':
crypto/arc4.c:65: warning: ISO C90 forbids mixed declarations and code

crypto/arc4.c

index 71a844704aaa1644dd7aa7c6d9bdd393cc89df92..5a49e6a22e80c3a0516004de62778cfa91ea142b 100644 (file)
@@ -59,10 +59,11 @@ static void arc4_crypt(void *ctx_arg, u8 *out, const u8 *in)
        u8 *const S = ctx->S;
        u8 x = ctx->x;
        u8 y = ctx->y;
+       u8 a, b;
 
-       u8 a = S[x];
+       a = S[x];
        y = (y + a) & 0xff;
-       u8 b = S[y];
+       b = S[y];
        S[x] = b;
        S[y] = a;
        x = (x + 1) & 0xff;