- if (selection[0] == '\\0') {
- strncpy(selection,p,1024);
- } else {
- strncat(selection, \",\",1);
- strncat(selection, p, 1023);
- }
+ if (selection[0] != '\\0')
+ strncat(selection, \",\", STRLEN - 1 - strlen(selection));
+ strncat(selection, p, STRLEN - 1 - strlen(selection));