diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-11-10 20:32:37 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-11-10 20:32:37 +0000 |
commit | 0e16c01cdcc3481eea85bcb152afcf0b519954d5 (patch) | |
tree | feb0a18ab452107f46c6097040af1dbaebeb74c6 /content/handlers/html/search.c | |
parent | ad27ed6926499f3381b8e7f6d80e86268919ec6c (diff) | |
download | netsurf-0e16c01cdcc3481eea85bcb152afcf0b519954d5.tar.gz netsurf-0e16c01cdcc3481eea85bcb152afcf0b519954d5.tar.bz2 |
remove unecessary user warning
Diffstat (limited to 'content/handlers/html/search.c')
-rw-r--r-- | content/handlers/html/search.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/content/handlers/html/search.c b/content/handlers/html/search.c index 1e2fa04f7..981c80b11 100644 --- a/content/handlers/html/search.c +++ b/content/handlers/html/search.c @@ -269,20 +269,18 @@ static const char *find_pattern(const char *string, int s_len, * Add a new entry to the list of matches * * \param start_idx Offset of match start within textual representation - * \param end_idx Offset of match end - * \param context The search context to add the entry to. + * \param end_idx Offset of match end + * \param context The search context to add the entry to. * \return Pointer to added entry, NULL iff failed. */ - -static struct list_entry *add_entry(unsigned start_idx, unsigned end_idx, - struct search_context *context) +static struct list_entry * +add_entry(unsigned start_idx, unsigned end_idx, struct search_context *context) { struct list_entry *entry; /* found string in box => add to list */ entry = calloc(1, sizeof(*entry)); if (!entry) { - guit->misc->warning("NoMemory", 0); return NULL; } @@ -293,10 +291,11 @@ static struct list_entry *add_entry(unsigned start_idx, unsigned end_idx, entry->next = 0; entry->prev = context->found->prev; - if (context->found->prev == NULL) + if (context->found->prev == NULL) { context->found->next = entry; - else + } else { context->found->prev->next = entry; + } context->found->prev = entry; |