a whole lot of size_t -> ssize_t.
[apps/madmutt.git] / complete.c
index e1815c7..40af1a6 100644 (file)
  *
  * return 0 if ok, -1 if no matches
  */
-int mutt_complete (char *s, size_t slen)
+int mutt_complete (char *s, ssize_t slen)
 {
   char *p;
   DIR *dirp = NULL;
   struct dirent *de;
   int i, init = 0;
-  size_t len;
+  ssize_t len;
   char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX];
   char filepart[_POSIX_PATH_MAX];
 
@@ -140,7 +140,7 @@ int mutt_complete (char *s, size_t slen)
       }
       else {
         *p = 0;
-        len = (size_t) (p - s);
+        len = p - s;
         memcpy(dirpart, s, len);
         dirpart[len] = 0;
         p++;