aboutsummarylogtreecommitdiffstats
path: root/portfolio.c
diff options
context:
space:
mode:
authorAntony Kellermann2018-09-04 21:43:26 -0400
committerAntony Kellermann2018-09-04 21:43:26 -0400
commitd0ba04661685755e2c92fb97dc0f2331dd02b87c (patch)
tree7f91085a04d166d5b60957834cf7646aa2659d86 /portfolio.c
parent352bdbf1ac8e74b332c99bf9670c1ff89bea8174 (diff)
downloadaur-d0ba04661685755e2c92fb97dc0f2331dd02b87c.tar.gz
Added streq macro
Diffstat (limited to 'portfolio.c')
-rw-r--r--portfolio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/portfolio.c b/portfolio.c
index 9bbc6e1944c6..b93dcf692e7d 100644
--- a/portfolio.c
+++ b/portfolio.c
@@ -81,7 +81,7 @@ int portfolio_modify_string(String* pString, const char* symbol, double quantity
GOTO_CLEAN_MSG("You don't have any of this security to remove")
}
- if (strcmp("USD$", symbol) != 0) { // Check that the symbol is valid, except if it's USD
+ if (!streq("USD$", symbol)) { // Check that the symbol is valid, except if it's USD
Info* data = info_init();
strcpy(data->symbol, symbol);
api_store_info(data, DATA_LEVEL_CHECK);
@@ -233,7 +233,7 @@ int portfolio_symbol_index(const char* symbol, const Json* jarray) {
for (size_t i = 0; i < json_object_array_length(jarray); i++) {
const char* string = json_object_get_string(
json_object_object_get(json_object_array_get_idx(jarray, (size_t) i), "Symbol"));
- if (strcmp(string, symbol) == 0)
+ if (streq(string, symbol))
return (int) i;
}