2
0
Эх сурвалжийг харах

Use utxxx specific variable name

tbeu 10 жил өмнө
parent
commit
ea39507455
2 өөрчлөгдсөн 8 нэмэгдсэн , 7 устгасан
  1. 4 4
      src/utarray.h
  2. 4 3
      src/utstring.h

+ 4 - 4
src/utarray.h

@@ -88,11 +88,11 @@ typedef struct {
 
 #define utarray_reserve(a,by) do {                                            \
   if (((a)->i+(by)) > ((a)->n)) {                                             \
-    char *tmp;                                                                \
+    char *utarray_tmp;                                                        \
     while(((a)->i+(by)) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); }   \
-    tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz);                           \
-    if (tmp == NULL) oom();                                                   \
-    (a)->d=tmp;                                                               \
+    utarray_tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz);                   \
+    if (utarray_tmp == NULL) oom();                                           \
+    (a)->d=utarray_tmp;                                                       \
   }                                                                           \
 } while(0)
 

+ 4 - 3
src/utstring.h

@@ -52,9 +52,10 @@ typedef struct {
 #define utstring_reserve(s,amt)                            \
 do {                                                       \
   if (((s)->n - (s)->i) < (size_t)(amt)) {                 \
-    char *tmp = (char*)realloc((s)->d, (s)->n + (amt));    \
-    if (tmp == NULL) oom();                                \
-    (s)->d = tmp;                                          \
+    char *utstring_tmp = (char*)realloc(                   \
+      (s)->d, (s)->n + (amt));                             \
+    if (utstring_tmp == NULL) oom();                       \
+    (s)->d = utstring_tmp;                                 \
     (s)->n += (amt);                                       \
   }                                                        \
 } while(0)