summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkfs.cramfs.c
diff options
context:
space:
mode:
authorSami Kerola2017-02-11 21:23:26 +0100
committerKarel Zak2017-02-20 12:58:49 +0100
commit87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3 (patch)
tree513541cfa347d7fc66e50137603489cb195c86de /disk-utils/mkfs.cramfs.c
parentcfdisk: avoid use of VLA in combination with sizeof() [smatch scan] (diff)
downloadkernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.gz
kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.xz
kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.zip
misc: do not use plain 0 as NULL [smatch scan]
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/mkfs.cramfs.c')
-rw-r--r--disk-utils/mkfs.cramfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 3c7d0f599..f277aaf23 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -302,7 +302,7 @@ static unsigned int parse_directory(struct entry *root_entry, const char *name,
endpath++;
/* read in the directory and sort */
- dircount = scandir(name, &dirlist, 0, cramsort);
+ dircount = scandir(name, &dirlist, NULL, cramsort);
if (dircount < 0)
err(MKFS_EX_ERROR, _("could not read directory %s"), name);
@@ -412,7 +412,7 @@ static unsigned int write_superblock(struct entry *root, char *base, int size)
super->size = size;
memcpy(super->signature, CRAMFS_SIGNATURE, sizeof(super->signature));
- super->fsid.crc = crc32(0L, Z_NULL, 0);
+ super->fsid.crc = crc32(0L, NULL, 0);
super->fsid.edition = opt_edition;
super->fsid.blocks = total_blocks;
super->fsid.files = total_nodes;
@@ -706,7 +706,7 @@ int main(int argc, char **argv)
loff_t fslen_ub = sizeof(struct cramfs_super);
unsigned int fslen_max;
char const *dirname, *outfile;
- uint32_t crc = crc32(0L, Z_NULL, 0);
+ uint32_t crc = crc32(0L, NULL, 0);
int c;
cramfs_is_big_endian = HOST_IS_BIG_ENDIAN; /* default is to use host order */