summaryrefslogtreecommitdiffstats
path: root/sys-utils/fstrim.c
diff options
context:
space:
mode:
authorSami Kerola2014-10-26 23:07:07 +0100
committerKarel Zak2014-10-31 10:38:58 +0100
commitb35c37274c93745fd8d7a05d02a85fbde8110ab0 (patch)
tree90215b2bb2eaad7836f9722a77a213912f20b9e3 /sys-utils/fstrim.c
parentsfdisk: return deterministic value from sfdisk_deinit() (diff)
downloadkernel-qcow2-util-linux-b35c37274c93745fd8d7a05d02a85fbde8110ab0.tar.gz
kernel-qcow2-util-linux-b35c37274c93745fd8d7a05d02a85fbde8110ab0.tar.xz
kernel-qcow2-util-linux-b35c37274c93745fd8d7a05d02a85fbde8110ab0.zip
fstrim: initialize path variable
Reading the code this initialization is not necessary, so the change is mostly about silencing a compiler warning and ensuring the program keeps on working if there is a future bug that could make uninitialized 'path' reachable to use. sys-utils/fstrim.c:247: warning: 'path' may be used uninitialized in this function Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/fstrim.c')
-rw-r--r--sys-utils/fstrim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 481a4cb0c..b18cdb263 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -244,7 +244,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
int main(int argc, char **argv)
{
- char *path;
+ char *path = NULL;
int c, rc, verbose = 0, all = 0;
struct fstrim_range range;