cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

make size of buffer in ccnl-buf.h of type size_t #330

Closed mfrey closed 5 years ago

mfrey commented 5 years ago

Description

The buffer in ccnl-buf.h is defined as follows

 31 struct ccnl_buf_s {
 32     struct ccnl_buf_s *next;
 33     ssize_t datalen;
 34     unsigned char data[1];
 35 };
 36 

Since we don't have any use-case where we might use a negative size of the buffer (datalen), the type of the length of the buffer should be size_t.