Check if a package name appears in an array. */
| 4257 | |
| 4258 | /* Check if a package name appears in an array. */ |
| 4259 | static bool pkg_in_list(const char *pkg, char **list, int count) { |
| 4260 | for (int j = 0; j < count; j++) { |
| 4261 | if (strcmp(pkg, list[j]) == 0) { |
| 4262 | return true; |
| 4263 | } |
| 4264 | } |
| 4265 | return false; |
| 4266 | } |
| 4267 | |
| 4268 | /* Collect package names from nodes matching a SQL query (must use ?1 = project). */ |
| 4269 | static int collect_pkg_names(cbm_store_t *s, const char *sql, const char *project, const char *path, |