diff options
author | phk <phk@FreeBSD.org> | 2002-10-15 18:21:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-15 18:21:53 +0000 |
commit | 1fe14c44e9c5a97821a432cc7b6d738d055485f7 (patch) | |
tree | 285792cb6c77bebdfab836f693ec25a2091059cf /sys | |
parent | 90fa623fbd99e0f5829e3680b3533f88783595e3 (diff) | |
download | FreeBSD-src-1fe14c44e9c5a97821a432cc7b6d738d055485f7.zip FreeBSD-src-1fe14c44e9c5a97821a432cc7b6d738d055485f7.tar.gz |
Constification ? Yes, out that door, row on the left, one patch each.
Sponsored by: DARPA & NAI Labs
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/geom.h | 10 | ||||
-rw-r--r-- | sys/geom/geom_enc.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 8f416d4..7a84c23 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -360,11 +360,11 @@ struct geomconfiggeom { /* geom_enc.c */ -uint16_t g_dec_be2(u_char *p); -uint32_t g_dec_be4(u_char *p); -uint16_t g_dec_le2(u_char *p); -uint32_t g_dec_le4(u_char *p); -uint64_t g_dec_le8(u_char *p); +uint16_t g_dec_be2(const u_char *p); +uint32_t g_dec_be4(const u_char *p); +uint16_t g_dec_le2(const u_char *p); +uint32_t g_dec_le4(const u_char *p); +uint64_t g_dec_le8(const u_char *p); void g_enc_le2(u_char *p, uint16_t u); void g_enc_le4(u_char *p, uint32_t u); void g_enc_le8(u_char *p, uint64_t u); diff --git a/sys/geom/geom_enc.c b/sys/geom/geom_enc.c index fb87e77..427650d 100644 --- a/sys/geom/geom_enc.c +++ b/sys/geom/geom_enc.c @@ -62,21 +62,21 @@ #include <geom/geom.h> uint16_t -g_dec_be2(u_char *p) +g_dec_be2(const u_char *p) { return((p[0] << 8) | p[1]); } uint32_t -g_dec_be4(u_char *p) +g_dec_be4(const u_char *p) { return((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); } uint16_t -g_dec_le2(u_char *p) +g_dec_le2(const u_char *p) { return((p[1] << 8) | p[0]); @@ -91,7 +91,7 @@ g_enc_le2(u_char *p, uint16_t u) } uint32_t -g_dec_le4(u_char *p) +g_dec_le4(const u_char *p) { return((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); @@ -109,7 +109,7 @@ g_enc_le4(u_char *p, uint32_t u) } uint64_t -g_dec_le8(u_char *p) +g_dec_le8(const u_char *p) { return(g_dec_le4(p) | ((uint64_t)(g_dec_le4(p + 4)) << 32)); |