diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-12 16:58:04 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-12 16:58:04 +0000 |
commit | 318404dfb9b380468fa0207a0434aeb81cbde5a5 (patch) | |
tree | 0179e73390bec377ac94fb7622e017f85dbb7a0e /enum.c | |
parent | e59480f4fe5f681ca2bd810c65455309c9138816 (diff) |
Fix casting error (bug #3681, take 2)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5176 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'enum.c')
-rwxr-xr-x | enum.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -276,7 +276,7 @@ static int txt_callback(void *context, u_char *answer, int len, u_char *fullansw /* answer is not null-terminated, but should be */ /* this is safe to do, as answer has extra bytes on the end we can safely overwrite with a null */ - answer[len] = (u_char)"\0"; + answer[len] = '\0'; /* now increment len so that len includes the null, so that we can compare apples to apples */ len +=1; @@ -285,7 +285,7 @@ static int txt_callback(void *context, u_char *answer, int len, u_char *fullansw strncpy(c->txt, answer, len < c->txtlen ? len-1 : (c->txtlen)-1); /* just to be safe, let's make sure c->txt is null terminated */ - c->txt[(c->txtlen)-1] = (char)"\0"; + c->txt[(c->txtlen)-1] = '\0'; return 1; } |