Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Andreas_Schwab:Factory
lsof
format.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File format.patch of Package lsof
From 31e998b62a3b2f7e30fddb4d6f96dc09d6f32aef Mon Sep 17 00:00:00 2001 From: Andreas Schwab <schwab@suse.de> Date: Tue, 22 Nov 2022 11:29:35 +0100 Subject: [PATCH] [linux] Use correct scanf/printf format for uint64_t --- dialects/linux/dproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dialects/linux/dproc.c b/dialects/linux/dproc.c index fa8ba5e..6621065 100644 --- a/dialects/linux/dproc.c +++ b/dialects/linux/dproc.c @@ -31,6 +31,8 @@ #include "lsof.h" +#include <inttypes.h> + /* * Local definitions @@ -1563,10 +1565,10 @@ process_proc_map(p, s, ss) uint64_t start, end; int ret; - if (sscanf(fp[0], "%lx-%lx", &start, &end) != 2) + if (sscanf(fp[0], "%"SCNx64"-%"SCNx64, &start, &end) != 2) goto stat_directly; - ret = snprintf(addr, sizeof(addr), "%lx-%lx", start, end); + ret = snprintf(addr, sizeof(addr), "%"PRIx64"-%"PRIx64, start, end); if (ret >= sizeof(addr) || ret <= 0) goto stat_directly; -- 2.38.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor