forked from Imagelibrary/rtems
@@ -419,7 +419,7 @@ rtems_rap_get_error (char* message, size_t max_message)
|
|||||||
{
|
{
|
||||||
rtems_rap_data_t* rap = rtems_rap_lock ();
|
rtems_rap_data_t* rap = rtems_rap_lock ();
|
||||||
int last_errno = rap->last_errno;
|
int last_errno = rap->last_errno;
|
||||||
strncpy (message, rap->last_error, sizeof (rap->last_error));
|
strlcpy (message, rap->last_error, max_message);
|
||||||
rtems_rap_unlock ();
|
rtems_rap_unlock ();
|
||||||
return last_errno;
|
return last_errno;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ rtems_rtl_get_error (char* message, size_t max_message)
|
|||||||
if (rtl != NULL)
|
if (rtl != NULL)
|
||||||
{
|
{
|
||||||
int last_errno = rtl->last_errno;
|
int last_errno = rtl->last_errno;
|
||||||
strncpy (message, rtl->last_error, sizeof (rtl->last_error));
|
strlcpy (message, rtl->last_error, max_message);
|
||||||
rtems_rtl_unlock ();
|
rtems_rtl_unlock ();
|
||||||
return last_errno;
|
return last_errno;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user