Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6101 → Rev 6102

/drivers/ddk/linux/string.c
48,6 → 48,33
}
return ret;
}
EXPORT_SYMBOL(strlcpy);
 
#ifndef __HAVE_ARCH_STRLCAT
/**
* strlcat - Append a length-limited, C-string to another
* @dest: The string to be appended to
* @src: The string to append to it
* @count: The size of the destination buffer.
*/
size_t strlcat(char *dest, const char *src, size_t count)
{
size_t dsize = strlen(dest);
size_t len = strlen(src);
size_t res = dsize + len;
 
/* This would be a bug */
BUG_ON(dsize >= count);
 
dest += dsize;
count -= dsize;
if (len >= count)
len = count-1;
memcpy(dest, src, len);
dest[len] = 0;
return res;
}
#endif
 
 
#endif