]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix types for t_fortuna.c
authorRobbie Harwood <rharwood@redhat.com>
Thu, 6 Apr 2017 19:45:57 +0000 (15:45 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 14 Apr 2017 16:02:56 +0000 (12:02 -0400)
clang warns about abs() being used on an unsigned value, although the
code did work in practice due to the implicit conversion from size_t
to int.

src/lib/crypto/krb/t_fortuna.c

index 4f25bee62cb5d11467a439de59749a110dd7cc17..508ffcf915c754190b366c19f4fab99fd6022ab2 100644 (file)
@@ -85,7 +85,7 @@ head_tail_test(struct fortuna_state *st)
 {
     static unsigned char buffer[1024 * 1024];
     unsigned char c;
-    size_t i, len = sizeof(buffer);
+    int i, len = sizeof(buffer);
     int bit, bits[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
     double res;