[Openmp-commits] [PATCH] D54948: Minor cleanup of debug code

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 28 12:20:58 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL347801: [OpenMP] Minor cleanup of debug code (authored by jlpeyton, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D54948?vs=175467&id=175747#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54948/new/

https://reviews.llvm.org/D54948

Files:
  openmp/trunk/runtime/src/kmp_settings.cpp


Index: openmp/trunk/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_settings.cpp
+++ openmp/trunk/runtime/src/kmp_settings.cpp
@@ -410,7 +410,7 @@
                                       int *out_range, char *out_routine,
                                       char *out_file, int *out_lb,
                                       int *out_ub) {
-  size_t len = KMP_STRLEN(value + 1);
+  size_t len = KMP_STRLEN(value) + 1;
   par_range_to_print = (char *)KMP_INTERNAL_MALLOC(len + 1);
   KMP_STRNCPY_S(par_range_to_print, len + 1, value, len + 1);
   __kmp_par_range = +1;
@@ -418,7 +418,7 @@
   __kmp_par_range_ub = INT_MAX;
   for (;;) {
     unsigned int len;
-    if ((value == NULL) || (*value == '\0')) {
+    if (*value == '\0') {
       break;
     }
     if (!__kmp_strcasecmp_with_sentinel("routine", value, '=')) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54948.175747.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181128/eec73520/attachment.bin>


More information about the Openmp-commits mailing list