diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 05:18:14 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 05:21:35 +0200 |
commit | fc863deadaf07da24f3593fca6c6e09b62cd772c (patch) | |
tree | 27ffd57657a907fb49f965e27521c803aabae65a /src/udev/mtd_probe/mtd_probe.c | |
parent | 3e2147858f21943d5f4a781c60f33ac22c6096ed (diff) |
udev: fix gcc warnings
Diffstat (limited to 'src/udev/mtd_probe/mtd_probe.c')
-rw-r--r-- | src/udev/mtd_probe/mtd_probe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/udev/mtd_probe/mtd_probe.c b/src/udev/mtd_probe/mtd_probe.c index 1aa08d3851..70c04db40b 100644 --- a/src/udev/mtd_probe/mtd_probe.c +++ b/src/udev/mtd_probe/mtd_probe.c @@ -28,19 +28,22 @@ int main(int argc, char** argv) { + int mtd_fd; + int error; + mtd_info_t mtd_info; + if (argc != 2) { printf("usage: mtd_probe /dev/mtd[n]\n"); return 1; } - int mtd_fd = open(argv[1], O_RDONLY); + mtd_fd = open(argv[1], O_RDONLY); if (mtd_fd == -1) { perror("open"); exit(-1); } - mtd_info_t mtd_info; - int error = ioctl(mtd_fd, MEMGETINFO, &mtd_info); + error = ioctl(mtd_fd, MEMGETINFO, &mtd_info); if (error == -1) { perror("ioctl"); exit(-1); |