jiridanek commented on a change in pull request #965:
URL: https://github.com/apache/qpid-dispatch/pull/965#discussion_r546751912



##########
File path: include/qpid/dispatch/ctools.h
##########
@@ -236,7 +236,6 @@ static inline void *qd_malloc(size_t size)
 
 static inline void *qd_calloc(size_t nmemb, size_t size)
 {
-    assert(nmemb && size);
     void *ptr = calloc(nmemb, size);
     if (!ptr) {

Review comment:
       Right. I forgot that `free(NULL)` (which is going to happen later, if 
`calloc` returned NULL) is perfectly valid. Anyways, in this case the return is 
non-zero on Ubuntu as well, so Travis is passing with this.
   
   Personally, I think that allocating zero-sized arrays and then looping over 
them is kind of neat, and I would leave that in place (and fix the check here).
   
   I fix the PR; if you want to resolve the issue differently, then feel free 
to reject the PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to