summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctm/ctm_scan/ctm_scan.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-20 07:13:39 +0000
committerphk <phk@FreeBSD.org>1994-09-20 07:13:39 +0000
commit57f797253137eb37262dac72d9867ab2476480bc (patch)
tree4521fa225d5666f37bcfeb8b9e0955c7775de34a /usr.sbin/ctm/ctm_scan/ctm_scan.c
parent936982de1343187e94e3bc9a63b9bbed4803f78a (diff)
downloadFreeBSD-src-57f797253137eb37262dac72d9867ab2476480bc.zip
FreeBSD-src-57f797253137eb37262dac72d9867ab2476480bc.tar.gz
A bunch of improvements. Still far to go.
Diffstat (limited to 'usr.sbin/ctm/ctm_scan/ctm_scan.c')
-rw-r--r--usr.sbin/ctm/ctm_scan/ctm_scan.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/ctm/ctm_scan/ctm_scan.c b/usr.sbin/ctm/ctm_scan/ctm_scan.c
index cf6e38e..623cd14 100644
--- a/usr.sbin/ctm/ctm_scan/ctm_scan.c
+++ b/usr.sbin/ctm/ctm_scan/ctm_scan.c
@@ -1,3 +1,14 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
+ * ----------------------------------------------------------------------------
+ *
+ * $Id$
+ *
+ */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -11,9 +22,9 @@
int barf[256];
int
-pstrcmp(char **p, char **q)
+pstrcmp(const void *pp, const void *qq)
{
- return strcmp(*p,*q);
+ return strcmp(*(char **)pp,*(char **)qq);
}
int
@@ -62,7 +73,7 @@ Do(char *path)
}
closedir(d);
if(!nde) return 0;
- qsort(pde,nde,sizeof *pde,pstrcmp);
+ qsort(pde,nde,sizeof *pde, pstrcmp);
for(k=0;k<nde;k++) {
strcpy(buf+bufp,pde[k]);
free(pde[k]);
OpenPOWER on IntegriCloud