Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/lib/libdtrace/common Adjust string ...
details: https://anonhg.NetBSD.org/src/rev/0fb81f39f238
branches: trunk
changeset: 938337:0fb81f39f238
user: christos <christos%NetBSD.org@localhost>
date: Sun Sep 06 21:49:32 2020 +0000
description:
Adjust string sizes
diffstat:
external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 7138d1138814 -r 0fb81f39f238 external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c Sun Sep 06 19:34:36 2020 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c Sun Sep 06 21:49:32 2020 +0000
@@ -956,7 +956,7 @@
dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid,
uint64_t addr, char *str, int nbytes)
{
- char name[PATH_MAX], objname[PATH_MAX], c[PATH_MAX * 2];
+ char name[PATH_MAX / 2], objname[PATH_MAX], c[PATH_MAX * 2];
struct ps_prochandle *P = NULL;
GElf_Sym sym;
char *obj;
@@ -977,8 +977,8 @@
obj = dt_basename(objname);
if (addr > sym.st_value) {
- (void) snprintf(c, sizeof (c), "%s`%s+0x%llx", obj,
- name, (u_longlong_t)(addr - sym.st_value));
+ (void) snprintf(c, sizeof (c), "%s`%s+0x%jx", obj,
+ name, (uintmax_t)(addr - sym.st_value));
} else {
(void) snprintf(c, sizeof (c), "%s`%s", obj, name);
}
Home |
Main Index |
Thread Index |
Old Index