Replaced deprecated BSD against ANSI functions (bzero -> memset, bcopy
-> memcopy)
This commit is contained in:
@ -57,7 +57,7 @@ mbus_serial_connect(char *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bzero(&(handle->t), sizeof(handle->t));
|
||||
memset(&(handle->t), 0, sizeof(handle->t));
|
||||
handle->t.c_cflag |= (CS8|CREAD|CLOCAL);
|
||||
handle->t.c_cflag |= PARENB;
|
||||
|
||||
@ -228,7 +228,7 @@ mbus_serial_recv_frame(mbus_serial_handle *handle, mbus_frame *frame)
|
||||
if (handle == NULL || frame == NULL)
|
||||
return -1;
|
||||
|
||||
bzero((void *)buff, sizeof(buff));
|
||||
memset((void *)buff, 0, sizeof(buff));
|
||||
|
||||
//
|
||||
// read data until a packet is received
|
||||
|
Reference in New Issue
Block a user