diff options
Diffstat (limited to 'usr.sbin/ctm/ctm_scan/ctm_scan.c')
-rw-r--r-- | usr.sbin/ctm/ctm_scan/ctm_scan.c | 17 |
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]); |