mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[liba] Simplify strlcat
This commit is contained in:
@@ -3,10 +3,7 @@
|
||||
size_t strlcat(char * dst, const char * src, size_t dstSize) {
|
||||
const size_t srcLen = strlen(src);
|
||||
size_t dstLen = strlen(dst);
|
||||
if (dstLen > dstSize) {
|
||||
dstLen = dstSize;
|
||||
}
|
||||
if (dstLen == dstSize) {
|
||||
if (dstLen >= dstSize) {
|
||||
return dstSize+srcLen;
|
||||
}
|
||||
if (srcLen < dstSize-dstLen) {
|
||||
|
||||
Reference in New Issue
Block a user