]> granicus.if.org Git - sudo/commitdiff
Fix cast.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 23 Feb 2015 13:32:43 +0000 (06:32 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 23 Feb 2015 13:32:43 +0000 (06:32 -0700)
lib/util/parseln.c

index 8445ea0e112a48d8b1f556720c2ad0ec66457928..cb249b0a657d404d04933e693f71f45fda3ca5c9 100644 (file)
@@ -84,7 +84,7 @@ sudo_parseln_v1(char **bufp, size_t *bufsizep, unsigned int *lineno, FILE *fp)
        /* Remove comments or check for line continuation (but not both) */
        if ((cp = strchr(line, '#')) != NULL) {
            *cp = '\0';
-           len = (size_t)(cp - line);
+           len = (ssize_t)(cp - line);
        } else if (len > 0 && line[len - 1] == '\\' && (len == 1 || line[len - 2] != '\\')) {
            line[--len] = '\0';
            continued = true;