~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/mpx-mul4-*.S: Use more portable type syntax for ambiguous instructions.
[catacomb]
/
symm
/
rc4.c
diff --git
a/symm/rc4.c
b/symm/rc4.c
index
214dbc1
..
4cb0e87
100644
(file)
--- a/
symm/rc4.c
+++ b/
symm/rc4.c
@@
-296,6
+296,7
@@
grand *rc4_rand(const void *k, size_t sz)
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
+#include <mLib/macros.h>
#include <mLib/quis.h>
#include <mLib/testrig.h>
#include <mLib/quis.h>
#include <mLib/testrig.h>
@@
-310,7
+311,7
@@
static int v_encrypt(dstr *v)
d.len = v[1].len;
rc4_encrypt(&ctx, v[1].buf, d.buf, d.len);
d.len = v[1].len;
rc4_encrypt(&ctx, v[1].buf, d.buf, d.len);
- if (
memcmp(v[2].buf, d.buf, d.len) != 0
) {
+ if (
MEMCMP(v[2].buf, !=, d.buf, d.len)
) {
ok = 0;
printf("\nfail encryption:"
"\n\tkey = ");
ok = 0;
printf("\nfail encryption:"
"\n\tkey = ");
@@
-336,7
+337,7
@@
static int v_generate(dstr *v)
d.len = v[2].len;
rc4_encrypt(&ctx, 0, d.buf, d.len);
d.len = v[2].len;
rc4_encrypt(&ctx, 0, d.buf, d.len);
- if (
memcmp(v[2].buf, d.buf, d.len) != 0
) {
+ if (
MEMCMP(v[2].buf, !=, d.buf, d.len)
) {
ok = 0;
printf("\nfail generation:"
"\n\tkey = ");
ok = 0;
printf("\nfail generation:"
"\n\tkey = ");