]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/showmount/showmount.c
Add -Wstrict-prototypes to compiler args, and fix warnings caused.
[nfs-utils.git] / utils / showmount / showmount.c
index f3ac671c9308f08df356226c6fda10596db6eccd..4e10a292846c50610ab636e2b2c6e618ec66d95b 100644 (file)
@@ -62,16 +62,14 @@ static struct option longopts[] =
 
 #define MAXHOSTLEN 256
 
-int dump_cmp(p, q)
-char **p;
-char **q;
+static int dump_cmp(const void *pv, const void *qv)
 {
+       const char **p = (const char **)pv;
+       const char **q = (const char **)qv;
        return strcmp(*p, *q);
 }
 
-static void usage(fp, n)
-FILE *fp;
-int n;
+static void usage(FILE *fp, int n)
 {
        fprintf(fp, "Usage: %s [-adehv]\n", program_name);
        fprintf(fp, "       [--all] [--directories] [--exports]\n");
@@ -249,9 +247,7 @@ static unsigned short getport(struct sockaddr_in *addr,
        return htons(port);
 }
 
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
 {
        char hostname_buf[MAXHOSTLEN];
        char *hostname;