summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2015-08-12 22:53:47 +0200
committerKarel Zak2015-08-12 22:53:47 +0200
commit2279ab60baa261a2b6835b25c21f5074463335bd (patch)
treeebeb42f1a29dc97c400047d2a40632557cf47dc4 /sys-utils
parentMerge branch 'patch-1' of https://github.com/borutmrak/util-linux (diff)
parenttests: add colcrt regression tests (diff)
downloadkernel-qcow2-util-linux-2279ab60baa261a2b6835b25c21f5074463335bd.tar.gz
kernel-qcow2-util-linux-2279ab60baa261a2b6835b25c21f5074463335bd.tar.xz
kernel-qcow2-util-linux-2279ab60baa261a2b6835b25c21f5074463335bd.zip
Merge branch 'colcrt' of git://github.com/kerolasa/lelux-utiliteetit
* 'colcrt' of git://github.com/kerolasa/lelux-utiliteetit: tests: add colcrt regression tests colcrt: allocate enough space for data moves [afl & asan] colcrt: avoid writing beyond array bound [afl & asan] colcrt: use #define in place of magic constants misc: fix redundant assignment and reassignments before use [cppcheck] tools: stop checkmans.sh validating libtool builds
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/blkdiscard.c2
-rw-r--r--sys-utils/fstrim.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/blkdiscard.c b/sys-utils/blkdiscard.c
index 3ee0b5d07..150689a62 100644
--- a/sys-utils/blkdiscard.c
+++ b/sys-utils/blkdiscard.c
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
stats[0] = range[0], stats[1] = 0;
gettime_monotonic(&last);
- for (range[0] = range[0]; range[0] < end; range[0] += range[1]) {
+ for (/* nothing */; range[0] < end; range[0] += range[1]) {
if (range[0] + range[1] > end)
range[1] = end - range[0];
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index c91141e27..6bbf1c99f 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -60,7 +60,7 @@ struct fstrim_range {
static int fstrim_filesystem(const char *path, struct fstrim_range *rangetpl,
int verbose)
{
- int fd = -1, rc;
+ int fd, rc;
struct stat sb;
struct fstrim_range range;