From 0ffc9b3219f78bf9325db763cbd8feca83ab9db4 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 30 May 2005 04:45:07 +0000 Subject: [PATCH] sprinkle more const --- sys/dev/aurateconv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/aurateconv.c b/sys/dev/aurateconv.c index 95d156b20ea9..f7e4d19cefcf 100644 --- a/sys/dev/aurateconv.c +++ b/sys/dev/aurateconv.c @@ -1,4 +1,4 @@ -/* $NetBSD: aurateconv.c,v 1.12 2005/03/12 03:55:45 kent Exp $ */ +/* $NetBSD: aurateconv.c,v 1.13 2005/05/30 04:45:07 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.12 2005/03/12 03:55:45 kent Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.13 2005/05/30 04:45:07 christos Exp $"); #include #include @@ -225,12 +225,12 @@ aurateconv_fetch_to(stream_fetcher_t *self, audio_stream_t *dst, int max_used) } -#define READ_S8LE(P) *(int8_t*)(P) +#define READ_S8LE(P) *(const int8_t*)(P) #define WRITE_S8LE(P, V) *(int8_t*)(P) = V -#define READ_S8BE(P) *(int8_t*)(P) +#define READ_S8BE(P) *(const int8_t*)(P) #define WRITE_S8BE(P, V) *(int8_t*)(P) = V #if BYTE_ORDER == LITTLE_ENDIAN -# define READ_S16LE(P) *(int16_t*)(P) +# define READ_S16LE(P) *(const int16_t*)(P) # define WRITE_S16LE(P, V) *(int16_t*)(P) = V # define READ_S16BE(P) (int16_t)((P)[0] | ((P)[1]<<8)) # define WRITE_S16BE(P, V) \ @@ -239,7 +239,7 @@ aurateconv_fetch_to(stream_fetcher_t *self, audio_stream_t *dst, int max_used) (P)[0] = vv; \ (P)[1] = vv >> 8; \ } while (/*CONSTCOND*/ 0) -# define READ_S32LE(P) *(int32_t*)(P) +# define READ_S32LE(P) *(const int32_t*)(P) # define WRITE_S32LE(P, V) *(int32_t*)(P) = V # define READ_S32BE(P) (int32_t)((P)[3] | ((P)[2]<<8) | ((P)[1]<<16) | (((int8_t)((P)[0]))<<24)) # define WRITE_S32BE(P, V) \