提交 a7f7c364 编写于 作者: J Jonathan Cameron 提交者: Greg Kroah-Hartman

staging:iio:Documentation: cleanup properly in buffer handling code

Eating the endian description for now.
Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 014fcb1d
......@@ -145,9 +145,17 @@ inline int iioutils_get_type(unsigned *is_signed,
ret = -errno;
goto error_free_filename;
}
fscanf(sysfsfp,
"%c%u/%u>>%u", &signchar, bits_used,
&padint, shift);
ret = fscanf(sysfsfp,
"%ce:%c%u/%u>>%u",
&endianchar,
&signchar,
bits_used,
&padint, shift);
if (ret < 0) {
printf("failed to pass scan type description\n");
return ret;
}
*bytes = padint / 8;
if (*bits_used == 64)
*mask = ~0;
......@@ -157,6 +165,10 @@ inline int iioutils_get_type(unsigned *is_signed,
*is_signed = 1;
else
*is_signed = 0;
fclose(sysfsfp);
free(filename);
filename = 0;
}
error_free_filename:
if (filename)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册