mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
tools:iio:iio_utils: initialize count during declaration
In build_channel_array(), count can be initialized already during variable declaration. Signed-off-by: Hartmut Knaack <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
ace76e42bc
commit
1e7c34788d
1 changed files with 1 additions and 2 deletions
|
|
@ -312,7 +312,7 @@ int build_channel_array(const char *device_dir,
|
|||
{
|
||||
DIR *dp;
|
||||
FILE *sysfsfp;
|
||||
int count, i;
|
||||
int count = 0, i;
|
||||
struct iio_channel_info *current;
|
||||
int ret;
|
||||
const struct dirent *ent;
|
||||
|
|
@ -370,7 +370,6 @@ int build_channel_array(const char *device_dir,
|
|||
goto error_close_dir;
|
||||
}
|
||||
seekdir(dp, 0);
|
||||
count = 0;
|
||||
while (ent = readdir(dp), ent != NULL) {
|
||||
if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
|
||||
"_en") == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue