diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-19 19:58:41 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-19 19:58:41 +0000 |
commit | fa277f1d6649f47a8d8f2d30d5383c18d92aa310 (patch) | |
tree | bf9194a6b16cbf514c057f88e2675fbe4019d4a3 /sys/lib/libsa | |
parent | b82e789acfca80685b99f1a656b67b324c295c17 (diff) |
Sprinkle const in static (internal) routines.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/bootp.c | 16 | ||||
-rw-r--r-- | sys/lib/libsa/cd9660.c | 18 |
2 files changed, 13 insertions, 21 deletions
diff --git a/sys/lib/libsa/bootp.c b/sys/lib/libsa/bootp.c index 692dc4fd119..0922c03b4fa 100644 --- a/sys/lib/libsa/bootp.c +++ b/sys/lib/libsa/bootp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootp.c,v 1.14 2014/07/13 15:31:20 mpi Exp $ */ +/* $OpenBSD: bootp.c,v 1.15 2014/11/19 19:58:40 miod Exp $ */ /* $NetBSD: bootp.c,v 1.10 1996/10/13 02:28:59 christos Exp $ */ /* @@ -59,8 +59,8 @@ static char vm_cmu[4] = VM_CMU; /* Local forwards */ static ssize_t bootpsend(struct iodesc *, void *, size_t); static ssize_t bootprecv(struct iodesc *, void *, size_t, time_t); -static void vend_cmu(u_char *); -static void vend_rfc1048(u_char *, u_int); +static void vend_cmu(const u_char *); +static void vend_rfc1048(const u_char *, u_int); /* Fetch required bootp information */ void @@ -260,15 +260,15 @@ bad: } static void -vend_cmu(u_char *cp) +vend_cmu(const u_char *cp) { - struct cmu_vend *vp; + const struct cmu_vend *vp; #ifdef BOOTP_DEBUG if (debug) printf("vend_cmu bootp info.\n"); #endif - vp = (struct cmu_vend *)cp; + vp = (const struct cmu_vend *)cp; if (vp->v_smask.s_addr != 0) smask = vp->v_smask.s_addr; @@ -277,9 +277,9 @@ vend_cmu(u_char *cp) } static void -vend_rfc1048(u_char *cp, u_int len) +vend_rfc1048(const u_char *cp, u_int len) { - u_char *ep; + const u_char *ep; int size; u_char tag; diff --git a/sys/lib/libsa/cd9660.c b/sys/lib/libsa/cd9660.c index 7e6480db007..3b929090ec4 100644 --- a/sys/lib/libsa/cd9660.c +++ b/sys/lib/libsa/cd9660.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660.c,v 1.14 2013/11/12 19:55:12 deraadt Exp $ */ +/* $OpenBSD: cd9660.c,v 1.15 2014/11/19 19:58:40 miod Exp $ */ /* $NetBSD: cd9660.c,v 1.1 1996/09/30 16:01:19 ws Exp $ */ /* @@ -43,14 +43,6 @@ #include <lib/libkern/libkern.h> -/* THIS IS AN UGLY HACK!!! XXX */ -struct fid; -struct mbuf; -struct nameidata; -struct netexport { int x; }; -struct proc; -struct statfs; -struct ucred; #include <isofs/cd9660/iso.h> #include "stand.h" @@ -75,9 +67,9 @@ struct ptable_ent { #define cdb2devb(bno) ((bno) * ISO_DEFAULT_BLOCK_SIZE / DEV_BSIZE) static int -pnmatch(char *path, struct ptable_ent *pp) +pnmatch(const char *path, struct ptable_ent *pp) { - char *cp; + const char *cp; int i; cp = pp->name; @@ -92,9 +84,9 @@ pnmatch(char *path, struct ptable_ent *pp) } static int -dirmatch(char *path, struct iso_directory_record *dp) +dirmatch(const char *path, struct iso_directory_record *dp) { - char *cp; + const char *cp; int i; /* This needs to be a regular file */ |