[PATCH 38/46] lib: fwts_uefi: reduce scope of variables
Colin King
colin.king at canonical.com
Tue Jan 13 19:04:57 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
cppcheck is picking up some minor style issues which can
be easily fixed:
[src/lib/src/fwts_uefi.c:79]:
(style) The scope of the variable 'fstype' can be reduced.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_uefi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
index 79524f5..e78b39b 100644
--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -76,7 +76,6 @@ static int fwts_uefi_get_interface(char **path)
static char efivar_path[4096];
FILE *fp;
- char fstype[1024];
struct statfs statbuf;
if (path == NULL) /* Sanity check */
@@ -94,6 +93,7 @@ static int fwts_uefi_get_interface(char **path)
if ((fp = fopen("/proc/mounts", "r")) != NULL) {
while (!feof(fp)) {
char mount[4096];
+ char fstype[1024];
if (fscanf(fp, "%*s %4095s %1023s", mount, fstype) == 2) {
/* Always try to find the newer interface first */
--
2.1.4
More information about the fwts-devel
mailing list