summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/procutils.c2
-rw-r--r--sys-utils/blkdiscard.c2
-rw-r--r--sys-utils/fstrim.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/procutils.c b/lib/procutils.c
index 00b977c5a..48ee7cf06 100644
--- a/lib/procutils.c
+++ b/lib/procutils.c
@@ -103,7 +103,7 @@ char *proc_get_command(pid_t pid)
char buf[BUFSIZ], *res = NULL;
ssize_t sz = 0;
size_t i;
- int fd = -1;
+ int fd;
snprintf(buf, sizeof(buf), "/proc/%d/cmdline", (int) pid);
fd = open(buf, O_RDONLY);
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;