/* 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 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";
/* now increment len so that len includes the null, so that we can
compare apples to apples */
len +=1;
/* now increment len so that len includes the null, so that we can
compare apples to apples */
len +=1;
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 */
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';