bytes++;
}
+ /* If size == 0 there is no space for a final null... */
if (size)
*q = '\0';
+
return bytes;
}
bytes++;
}
- if (size)
- *q = '\0';
+ *q = '\0';
return bytes;
}
#endif /* __OWN_STRLCPYCAT__ */
if (count >= sizeof(line))
continue;
- strlcpy(line, bufline, count);
+ memcpy(line, bufline, count-1);
+ line[count-1] = '\0';
pos = line;
/* get name */