tools: env: Fix printf() warning in fw_env
authorSimon Glass <sjg@chromium.org>
Sat, 1 Aug 2020 16:30:38 +0000 (10:30 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Aug 2020 12:18:34 +0000 (08:18 -0400)
The printf() string produces a warning about %d not matching size_t. Fix
it and put the format string on one line to avoid a checkpatch warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/env/fw_env.c

index 3ab1ae6..ccbeb55 100644 (file)
@@ -952,8 +952,8 @@ static int flash_read_buf(int dev, int fd, void *buf, size_t count,
                        return -1;
                }
                if (rc != readlen) {
-                       fprintf(stderr, "Read error on %s: "
-                               "Attempted to read %d bytes but got %d\n",
+                       fprintf(stderr,
+                               "Read error on %s: Attempted to read %zd bytes but got %d\n",
                                DEVNAME(dev), readlen, rc);
                        return -1;
                }