summaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.c
diff options
context:
space:
mode:
authorSami Kerola2014-09-28 21:51:44 +0200
committerKarel Zak2014-10-01 12:33:42 +0200
commit7fe033ef9a3e53b40c71b459b56d3405b51b22f8 (patch)
treeec5c17f946f27cd6a564d8cc226ca937142103cf /misc-utils/lsblk.c
parentinclude: fix compiler warnings (diff)
downloadkernel-qcow2-util-linux-7fe033ef9a3e53b40c71b459b56d3405b51b22f8.tar.gz
kernel-qcow2-util-linux-7fe033ef9a3e53b40c71b459b56d3405b51b22f8.tar.xz
kernel-qcow2-util-linux-7fe033ef9a3e53b40c71b459b56d3405b51b22f8.zip
lsblk: fix compiler warning
warning: ISO C forbids empty initializer braces [-Wpedantic] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r--misc-utils/lsblk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index dc1cf69d0..a87d997eb 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -1143,7 +1143,7 @@ static int list_partitions(struct blkdev_cxt *wholedisk_cxt, struct blkdev_cxt *
{
DIR *dir;
struct dirent *d;
- struct blkdev_cxt part_cxt = {};
+ struct blkdev_cxt part_cxt = { 0 };
int r = -1;
assert(wholedisk_cxt);
@@ -1242,7 +1242,7 @@ static int list_deps(struct blkdev_cxt *cxt)
{
DIR *dir;
struct dirent *d;
- struct blkdev_cxt dep = {};
+ struct blkdev_cxt dep = { 0 };
char dirname[PATH_MAX];
const char *depname;
@@ -1293,7 +1293,7 @@ static int iterate_block_devices(void)
{
DIR *dir;
struct dirent *d;
- struct blkdev_cxt cxt = {};
+ struct blkdev_cxt cxt = { 0 };
if (!(dir = opendir(_PATH_SYS_BLOCK)))
return EXIT_FAILURE;
@@ -1341,7 +1341,7 @@ static char *devno_to_sysfs_name(dev_t devno, char *devname, char *buf, size_t b
static int process_one_device(char *devname)
{
- struct blkdev_cxt parent = {}, cxt = {};
+ struct blkdev_cxt parent = { 0 }, cxt = { 0 };
struct stat st;
char buf[PATH_MAX + 1], *name, *diskname = NULL;
dev_t disk = 0;