- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops
diff --git a/library/padlock.c b/library/padlock.c
index d576544..2e2e477 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -33,13 +33,10 @@
 
 #if defined(POLARSSL_PADLOCK_C)
 
-#include "polarssl/aes.h"
 #include "polarssl/padlock.h"
 
 #if defined(POLARSSL_HAVE_X86)
 
-#include <string.h>
-
 /*
  * PadLock detection routine
  */
@@ -115,12 +112,13 @@
  */
 int padlock_xcryptcbc( aes_context *ctx,
                        int mode,
-                       int length,
+                       size_t length,
                        unsigned char iv[16],
                        const unsigned char *input,
                        unsigned char *output )
 {
-    int ebx, count;
+    int ebx;
+    size_t count;
     unsigned long *rk;
     unsigned long *iw;
     unsigned long *ctrl;