In build_channel_array(), count can be initialized already during variable
declaration.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
{
DIR *dp;
FILE *sysfsfp;
{
DIR *dp;
FILE *sysfsfp;
struct iio_channel_info *current;
int ret;
const struct dirent *ent;
struct iio_channel_info *current;
int ret;
const struct dirent *ent;
goto error_close_dir;
}
seekdir(dp, 0);
goto error_close_dir;
}
seekdir(dp, 0);
while (ent = readdir(dp), ent != NULL) {
if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
"_en") == 0) {
while (ent = readdir(dp), ent != NULL) {
if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
"_en") == 0) {