diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-05 22:43:40 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-05 22:43:40 +0200 |
commit | ef554d088031cc7255bae7b417ac29c01698f43f (patch) | |
tree | 8eb2bebe71290eb4baa8c337111cbecc2be8e94d /src | |
parent | a18bad989696b5047fab20e579a6e5a886a4904f (diff) |
const: Make the data parameter for unpack const
Diffstat (limited to 'src')
-rw-r--r-- | src/smpp34_structs.h | 4 | ||||
-rw-r--r-- | src/smpp34_unpack.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/smpp34_structs.h b/src/smpp34_structs.h index d2cc1d3..b9effb2 100644 --- a/src/smpp34_structs.h +++ b/src/smpp34_structs.h @@ -256,6 +256,6 @@ int smpp34_dumpPdu2(uint8_t *dest, int size_dest, void* tt); int smpp34_pack(uint32_t type,uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt); int smpp34_pack2(uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt); -int smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen); -int smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen); +int smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen); +int smpp34_unpack2(void* tt, const uint8_t *ptrBuf, int ptrLen); #endif /* _STB_H_ */ diff --git a/src/smpp34_unpack.c b/src/smpp34_unpack.c index aa223f9..e378b0b 100644 --- a/src/smpp34_unpack.c +++ b/src/smpp34_unpack.c @@ -40,12 +40,12 @@ extern char *ptrerror; /* FUNCTIONS ******************************************************************/ int -smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen) +smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen) { char dummy_b[SMALL_BUFF]; - uint8_t *ini = ptrBuf; - uint8_t *aux = ptrBuf; + const uint8_t *ini = ptrBuf; + const uint8_t *aux = ptrBuf; int lenval = 0; int left = ptrLen; int lefterror = 0; @@ -243,7 +243,7 @@ smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen) }; int -smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen) +smpp34_unpack2(void* tt, const uint8_t *ptrBuf, int ptrLen) { uint32_t cmdid; uint32_t tempo; |