| 1210 | */ |
| 1211 | |
| 1212 | int /* O - 1 on success, 0 on failure */ |
| 1213 | cupsdAddString(cups_array_t **a, /* IO - String array */ |
| 1214 | const char *s) /* I - String to copy and add */ |
| 1215 | { |
| 1216 | if (!*a) |
| 1217 | *a = cupsArrayNew3((cups_array_func_t)strcmp, NULL, |
| 1218 | (cups_ahash_func_t)NULL, 0, |
| 1219 | (cups_acopy_func_t)strdup, |
| 1220 | (cups_afree_func_t)free); |
| 1221 | |
| 1222 | return (cupsArrayAdd(*a, (char *)s)); |
| 1223 | } |
| 1224 | |
| 1225 | |
| 1226 | /* |
no test coverage detected