diff options
Diffstat (limited to 'booki.c')
| -rw-r--r-- | booki.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -347,13 +347,13 @@ char** search(int argc, char* argv[]) { field = search_opts.opts[i]; // compare fields - if (strcmp(field, "title") == 0) { + if (ATTR_MATCH(field, "title")) { if (!regex_match(search_opts.args[i], book->title)) break; - } else if (strcmp(field, "author") == 0) { + } else if (ATTR_MATCH(field, "author")) { if (!regex_match(search_opts.args[i], book->author)) break; - } else if (strcmp(field, "language") == 0) { + } else if (ATTR_MATCH(field, "language")) { if (!regex_match(search_opts.args[i], book->language)) break; } else { |
