]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
wdc: Fix compiler warning.
authorjeff-lien-wdc <jeff.lien@wdc.com>
Tue, 2 Jul 2024 14:45:23 +0000 (09:45 -0500)
committerDaniel Wagner <wagi@monom.org>
Tue, 2 Jul 2024 16:44:15 +0000 (18:44 +0200)
Make the file_path array size big enough to contain the
full directory and file name.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
plugins/wdc/wdc-nvme.c

index 89b0d73814c6adeb21a57ae7745e844344e8a062..bf1ab78b71242ffcd43a1566c3cd0377497e6eae 100644 (file)
@@ -3711,7 +3711,7 @@ free_buf:
 
 static int dump_internal_logs(struct nvme_dev *dev, char *dir_name, int verbose)
 {
-       char file_path[128];
+       char file_path[PATH_MAX];
        void *telemetry_log;
        const size_t bs = 512;
        struct nvme_telemetry_log *hdr;