Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/file/dist/src Cast an off_t to intmax_t and use...



details:   https://anonhg.NetBSD.org/src/rev/185ad8d31b50
branches:  trunk
changeset: 847300:185ad8d31b50
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 17 08:02:00 2019 +0000

description:
Cast an off_t to intmax_t and use %jd to printf it.

diffstat:

 external/bsd/file/dist/src/readelf.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 610c15299a71 -r 185ad8d31b50 external/bsd/file/dist/src/readelf.c
--- a/external/bsd/file/dist/src/readelf.c      Tue Dec 17 07:57:25 2019 +0000
+++ b/external/bsd/file/dist/src/readelf.c      Tue Dec 17 08:02:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readelf.c,v 1.22 2019/12/17 02:31:05 christos Exp $    */
+/*     $NetBSD: readelf.c,v 1.23 2019/12/17 08:02:00 martin Exp $      */
 
 /*
  * Copyright (c) Christos Zoulas 2003.
@@ -32,7 +32,7 @@
 #if 0
 FILE_RCSID("@(#)$File: readelf.c,v 1.168 2019/12/16 03:49:19 christos Exp $")
 #else
-__RCSID("$NetBSD: readelf.c,v 1.22 2019/12/17 02:31:05 christos Exp $");
+__RCSID("$NetBSD: readelf.c,v 1.23 2019/12/17 08:02:00 martin Exp $");
 #endif
 #endif
 
@@ -1355,8 +1355,8 @@
        name_off = xsh_offset;
 
        if (fsize != SIZE_UNKNOWN && fsize < name_off) {
-               if (file_printf(ms, ", too large section header offset %td",
-                   name_off) == -1)
+               if (file_printf(ms, ", too large section header offset %jd",
+                   (intmax_t)name_off) == -1)
                        return -1;
                return 0;
        }



Home | Main Index | Thread Index | Old Index