aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-03 22:13:25 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-03 22:13:25 +0000
commitcdb38a02582aaf4c9b9d953f4fdbf93571f6de1b (patch)
treeea6c00880baa5ffd7e0db70a64379ce7fc50fb2d /res
parentd8c79fc61c97de323907065165438bc96b0a04f5 (diff)
Resolve another warning.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227464 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_pktccops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pktccops.c b/res/res_pktccops.c
index 3a539f59e..c3f7aa6be 100644
--- a/res/res_pktccops.c
+++ b/res/res_pktccops.c
@@ -315,6 +315,7 @@ static int cops_getmsg (int sfd, struct copsmsg *recmsg)
int len, lent;
char buf[COPS_HEADER_SIZE];
struct pktcobj *pobject = NULL;
+ uint16_t *ubuf = (uint16_t *) buf;
recmsg->msg = NULL;
recmsg->object = NULL;
len = recv(sfd, buf, COPS_HEADER_SIZE, MSG_DONTWAIT);
@@ -357,7 +358,7 @@ static int cops_getmsg (int sfd, struct copsmsg *recmsg)
return lent;
}
len += lent;
- pobject->length = ntohs(*((uint16_t *) buf));
+ pobject->length = ntohs(*ubuf);
pobject->cnum = *(buf + 2);
pobject->ctype = *(buf + 3);
if (!(pobject->contents = malloc(pobject->length - COPS_OBJECT_HEADER_SIZE))) {