From: Karel Zak Date: Thu, 17 Jun 2021 11:26:50 +0000 (+0200) Subject: mkfs.cramfs: add comment to explain readlink() use X-Git-Tag: v2.37.1~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f113d46a503b8bd9a87fff12e384f1c5468691dd;p=thirdparty%2Futil-linux.git mkfs.cramfs: add comment to explain readlink() use Signed-off-by: Karel Zak --- diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 1d0d17bf1d..1fcb927782 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -157,6 +157,8 @@ do_mmap(char *path, unsigned int size, unsigned int mode){ return NULL; if (S_ISLNK(mode)) { + /* The link buffer is unnecessary to terminate by null as it's + * always used as buffer rather than a string */ start = xmalloc(size); if (readlink(path, start, size) < 0) { warn(_("readlink failed: %s"), path);