Remove dependency on skygw_utils.h
- STRERROR_BUFLEN moved to cdefs.h and renamed to MXS_STRERROR_BUFLEN. Better would be to provide a 'const char* mxs_strerror(int errno)' that would have a thread specific buffer for the error message. - MIN and MAX also moved to defs.h as MXS_MIN and MXS_MAX. - Now only mlist.h of the headers depend upon skygw_utils.h.
This commit is contained in:
@ -121,7 +121,7 @@ gwbuf_alloc(unsigned int size)
|
||||
retblock:
|
||||
if (rval == NULL)
|
||||
{
|
||||
char errbuf[STRERROR_BUFLEN];
|
||||
char errbuf[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Memory allocation failed due to %s.",
|
||||
strerror_r(errno, errbuf, sizeof(errbuf)));
|
||||
}
|
||||
@ -964,7 +964,7 @@ size_t gwbuf_copy_data(GWBUF *buffer, size_t offset, size_t bytes, uint8_t* dest
|
||||
|
||||
if (buffer)
|
||||
{
|
||||
bytes_left = MIN(GWBUF_LENGTH(buffer), bytes);
|
||||
bytes_left = MXS_MIN(GWBUF_LENGTH(buffer), bytes);
|
||||
ptr = (uint8_t*) GWBUF_DATA(buffer);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user