diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-14 22:02:19 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-14 22:02:19 +0000 |
commit | fae6856ca5fb58b9b3a8d05afe6101deeaaf0009 (patch) | |
tree | aa78fc6a67930bc0b26712db24f14dbd26694f28 /res/res_adsi.c | |
parent | 8cd540a042969a9956243bd2d984e67dbaec4c75 (diff) |
constification and code simplifications
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20165 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_adsi.c')
-rw-r--r-- | res/res_adsi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/res/res_adsi.c b/res/res_adsi.c index 730b336d1..2e0a004f4 100644 --- a/res/res_adsi.c +++ b/res/res_adsi.c @@ -428,7 +428,7 @@ int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msgl return adsi_transmit_message_full(chan, msg, msglen, msgtype, 1); } -static inline int ccopy(unsigned char *dst, unsigned char *src, int max) +static inline int ccopy(unsigned char *dst, const unsigned char *src, int max) { int x=0; /* Carefully copy the requested data */ @@ -439,7 +439,7 @@ static inline int ccopy(unsigned char *dst, unsigned char *src, int max) return x; } -int adsi_load_soft_key(unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data) +int adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, const char *ret, int data) { int bytes=0; @@ -453,13 +453,13 @@ int adsi_load_soft_key(unsigned char *buf, int key, char *llabel, char *slabel, buf[bytes++] = key; /* Carefully copy long label */ - bytes += ccopy(buf + bytes, (unsigned char *)llabel, 18); + bytes += ccopy(buf + bytes, (const unsigned char *)llabel, 18); /* Place delimiter */ buf[bytes++] = 0xff; /* Short label */ - bytes += ccopy(buf + bytes, (unsigned char *)slabel, 7); + bytes += ccopy(buf + bytes, (const unsigned char *)slabel, 7); /* If specified, copy return string */ @@ -469,7 +469,7 @@ int adsi_load_soft_key(unsigned char *buf, int key, char *llabel, char *slabel, if (data) buf[bytes++] = ADSI_SWITCH_TO_DATA2; /* Carefully copy return string */ - bytes += ccopy(buf + bytes, (unsigned char *)ret, 20); + bytes += ccopy(buf + bytes, (const unsigned char *)ret, 20); } /* Replace parameter length */ |