[Openmp-commits] [PATCH] D91309: [OpenMP] Fixed a bug when displaying affinity
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Nov 12 19:27:55 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG24d0ef0f503f: [OpenMP] Fixed a bug when displaying affinity (authored by tianshilei1992).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91309/new/
https://reviews.llvm.org/D91309
Files:
openmp/runtime/src/kmp_safe_c_api.h
openmp/runtime/test/affinity/format/simple_env.c
Index: openmp/runtime/test/affinity/format/simple_env.c
===================================================================
--- openmp/runtime/test/affinity/format/simple_env.c
+++ openmp/runtime/test/affinity/format/simple_env.c
@@ -13,4 +13,4 @@
return 0;
}
-// CHECK-8: num_threads=8 TESTER-ENV: tl:1 tn:[0-7] nt:8
+// CHECK-8: num_threads=8 TESTER-ENV: tl:1 tn:[0-7] nt:8$
Index: openmp/runtime/src/kmp_safe_c_api.h
===================================================================
--- openmp/runtime/src/kmp_safe_c_api.h
+++ openmp/runtime/src/kmp_safe_c_api.h
@@ -64,11 +64,9 @@
char const *src, size_t src_size) {
if (src_size >= buf_size) {
src_size = buf_size - 1;
- KMP_STRNCPY_S(buffer, buf_size, src, src_size);
- buffer[buf_size - 1] = '\0';
- } else {
- KMP_STRNCPY_S(buffer, buf_size, src, src_size);
}
+ KMP_STRNCPY_S(buffer, buf_size, src, src_size);
+ buffer[src_size] = '\0';
}
#endif // KMP_SAFE_C_API_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91309.305013.patch
Type: text/x-patch
Size: 1002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201113/f23a3c5e/attachment.bin>
More information about the Openmp-commits
mailing list