]> granicus.if.org Git - sudo/commitdiff
coerce difference of pointers to int when used in a string length printf
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 4 Feb 2001 16:16:20 +0000 (16:16 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 4 Feb 2001 16:16:20 +0000 (16:16 +0000)
format; deraadt@openbsd.org

defaults.c

index 8e2fe1ddb84f172100ed7a90ef792a8b71b866e3..7cace303b0ba84630fe0da284f0dfbf99c8874fa 100644 (file)
@@ -169,8 +169,8 @@ list_options()
                default:
                    p = strrchr(cur->desc, ':');
                    if (p)
-                       (void) printf("%s: %.*s\n", cur->name, p - cur->desc,
-                           cur->desc);
+                       (void) printf("%s: %.*s\n", cur->name,
+                           (int) (p - cur->desc), cur->desc);
                    else
                        (void) printf("%s: %s\n", cur->name, cur->desc);
                    break;