[clinfo] 27/36: Fix time_offset bufcpy conversion
Andreas Beckmann
anbe at moszumanska.debian.org
Wed Feb 17 18:32:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository clinfo.
commit c10ecf19719b31f0d1df86748abc894aceb99053
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date: Mon Jan 11 10:19:38 2016 +0100
Fix time_offset bufcpy conversion
---
src/clinfo.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/clinfo.c b/src/clinfo.c
index 2d581e9..9ef6cc0 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -880,8 +880,9 @@ int device_info_time_offset(cl_device_id dev, cl_device_info param, const char *
time_t time = val/UINT64_C(1000000000);
szval += snprintf(strbuf, bufsz, "%" PRIu64 "ns (", val);
szval += bufcpy(szval, ctime(&time));
+ /* overwrite ctime's newline with the closing parenthesis */
if (szval < bufsz)
- strbuf[szval] = ')';
+ strbuf[szval - 1] = ')';
}
show_strbuf(pname, 0);
return had_error;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git
More information about the Pkg-opencl-commits
mailing list