You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/11/22 19:30:27 UTC

[qpid-proton] branch master updated: NO-JIRA: [C] Remove long unused code

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 41c15e1  NO-JIRA: [C] Remove long unused code
41c15e1 is described below

commit 41c15e1c6eed4d1edfe461926b8bf0e75b672730
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Nov 22 14:26:45 2019 -0500

    NO-JIRA: [C] Remove long unused code
    
    This reverts commit 7efe42d9eaa00073d98827ca792f2fcffb64885f.
---
 c/src/core/util.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/c/src/core/util.h b/c/src/core/util.h
index baddff0..efa9d6f 100644
--- a/c/src/core/util.h
+++ b/c/src/core/util.h
@@ -117,18 +117,4 @@ static inline pn_bytes_t pn_string_bytes(pn_string_t *s) {
 #define pn_min(X,Y) ((X) > (Y) ? (Y) : (X))
 #define pn_max(X,Y) ((X) < (Y) ? (Y) : (X))
 
-#define PN_ENSURE(ARRAY, CAPACITY, COUNT, TYPE)                 \
-  while ((CAPACITY) < (COUNT)) {                                \
-    (CAPACITY) = (CAPACITY) ? 2 * (CAPACITY) : 16;              \
-    (ARRAY) = (TYPE *) realloc((ARRAY), (CAPACITY) * sizeof (TYPE));    \
-  }                                                             \
-
-#define PN_ENSUREZ(ARRAY, CAPACITY, COUNT, TYPE)           \
-  {                                                        \
-    size_t _old_capacity = (CAPACITY);                     \
-    PN_ENSURE(ARRAY, CAPACITY, COUNT, TYPE);               \
-    memset((ARRAY) + _old_capacity, 0,                     \
-           sizeof(TYPE)*((CAPACITY) - _old_capacity));     \
-  }
-
 #endif /* util.h */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org