diff options
author | Werner Koch <wk@gnupg.org> | 2002-10-14 18:07:00 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-10-14 18:07:00 +0000 |
commit | e74ee5afb805cd46c9ea77a4888664fc904645e2 (patch) | |
tree | a4805a34d1703f8f1336e70b53c25f8327920bba /cipher/arcfour.c | |
parent | 71ec74ab090fcc0e715ff74d5f489572813f8829 (diff) | |
download | libgcrypt-e74ee5afb805cd46c9ea77a4888664fc904645e2.tar.gz |
* arcfour.c (do_encrypt_stream): Don't use increment op when
assigning to the same variable.
Diffstat (limited to 'cipher/arcfour.c')
-rw-r--r-- | cipher/arcfour.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/arcfour.c b/cipher/arcfour.c index dec465eb..66017b08 100644 --- a/cipher/arcfour.c +++ b/cipher/arcfour.c @@ -63,7 +63,8 @@ do_encrypt_stream( ARCFOUR_context *ctx, while ( length-- ) { - i = ++i & 255; /* and seems to faster than mod */ + i++; + i = i & 255; /* and seems to be faster than mod */ j += sbox[i]; j &= 255; t = sbox[i]; sbox[i] = sbox[j]; sbox[j] = t; |