Change-Id: Ibbcf3496ebfb20c53b953db84b2ddb69083dcb86
Reviewed-on: https://code.wireshark.org/review/4556
Reviewed-by: Guy Harris <guy@alum.mit.edu>
bytes_read = read(fd, ptr, (int)bytes_needed);
if (bytes_read == 0) {
*err = WTAP_ERR_SHORT_READ;
- *err_info = "Got zero bytes reading data from pipe";
return FALSE;
} else if (bytes_read < 0) {
*err = errno;
return FALSE;
}
+ *err_info = NULL;
bytes_needed -= bytes_read;
*data_offset += bytes_read;
ptr += bytes_read;
if (fh->err!=0 && err_info) {
/* g_strdup() returns NULL for NULL argument */
*err_info = g_strdup(fh->err_info);
- }
+ } else
+ *err_info = NULL;
return fh->err;
}