/* look for the first element, it has to be the requested element. Bail
* out if it is not within the first 4kB. */
- while (data && pos < MIN (4096, length)) {
+ while (pos < MIN (4096, length)) {
while (*data != '<' && pos < MIN (4096, length)) {
XML_INC_BUFFER_DATA;
}
/* the first normal element, check if it's the one asked for */
if (pos + elen + 1 >= length)
return FALSE;
- return (data && element && strncmp ((char *) data, element, elen) == 0);
+ return (element && strncmp ((const char *) data, element, elen) == 0);
}
return FALSE;