added checks to trick the gcc4 compiler. this way the label is kept.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2ef329a206
commit
f5c30dd323
@ -587,6 +587,10 @@ arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr_t *faultHandl
|
||||
char *tmp = (char *)to;
|
||||
char *s = (char *)from;
|
||||
|
||||
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||
if (to == NULL)
|
||||
goto error;
|
||||
|
||||
*faultHandler = (addr_t)&&error;
|
||||
|
||||
while (size--)
|
||||
@ -606,6 +610,10 @@ arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr_t *faultHand
|
||||
{
|
||||
int fromLength = 0;
|
||||
|
||||
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||
if (to == NULL)
|
||||
goto error;
|
||||
|
||||
*faultHandler = (addr_t)&&error;
|
||||
|
||||
if (size > 0) {
|
||||
@ -635,6 +643,10 @@ arch_cpu_user_memset(void *s, char c, size_t count, addr_t *faultHandler)
|
||||
{
|
||||
char *xs = (char *)s;
|
||||
|
||||
// this check is to trick the gcc4 compiler and have it keep the error label
|
||||
if (s == NULL)
|
||||
goto error;
|
||||
|
||||
*faultHandler = (addr_t)&&error;
|
||||
|
||||
while (count--)
|
||||
|
Loading…
x
Reference in New Issue
Block a user