summaryrefslogtreecommitdiffstats
path: root/usr.sbin/zic/zic.c
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-07-15 06:20:45 +0000
committerdd <dd@FreeBSD.org>2001-07-15 06:20:45 +0000
commit12905cca18a426ad61e22cdda820116f6b9ecfcf (patch)
treecc364f39ce214e405b1f03e2e603c055b67c63f6 /usr.sbin/zic/zic.c
parentb578da3f944fbfadede60707e01e8b6cf4e06b23 (diff)
downloadFreeBSD-src-12905cca18a426ad61e22cdda820116f6b9ecfcf.zip
FreeBSD-src-12905cca18a426ad61e22cdda820116f6b9ecfcf.tar.gz
Constify, add some prototypes, and set WARNS=2.
Submitted by: Mike Barcroft <mike@q9media.com>
Diffstat (limited to 'usr.sbin/zic/zic.c')
-rw-r--r--usr.sbin/zic/zic.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c
index 109b978..1d50a7f 100644
--- a/usr.sbin/zic/zic.c
+++ b/usr.sbin/zic/zic.c
@@ -89,6 +89,7 @@ static int addtype P((long gmtoff, const char * abbr, int isdst,
static void leapadd P((time_t t, int positive, int rolling, int count));
static void adjleap P((void));
static void associate P((void));
+static int atcomp P((const void * avp, const void * bvp));
static int ciequal P((const char * ap, const char * bp));
static void convert P((long val, char * buf));
static void dolink P((const char * fromfile, const char * tofile));
@@ -129,6 +130,7 @@ static void setgroup P((gid_t *flag, const char *name));
static void setuser P((uid_t *flag, const char *name));
static time_t tadd P((time_t t1, long t2));
static void usage P((void));
+static void warning P((const char * const string));
static void writezone P((const char * name));
static int yearistype P((int year, const char * type));
@@ -1360,12 +1362,14 @@ FILE * const fp;
static int
atcomp(avp, bvp)
-void * avp;
-void * bvp;
+const void * avp;
+const void * bvp;
{
- if (((struct attype *) avp)->at < ((struct attype *) bvp)->at)
+ if (((const struct attype *) avp)->at <
+ ((const struct attype *) bvp)->at)
return -1;
- else if (((struct attype *) avp)->at > ((struct attype *) bvp)->at)
+ else if (((const struct attype *) avp)->at >
+ ((const struct attype *) bvp)->at)
return 1;
else return 0;
}
OpenPOWER on IntegriCloud