mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-26 06:32:13 +00:00
MINOR: config: Don't dump keywords if argument is NULL
Helper functions are used to dump bind, server or filter keywords. These functions are used to report errors during the configuration parsing. To have a coherent API, these functions are now prepared to handle a null pointer as argument. If so, no action is performed and functions immediately return. This patch should fix the issue #631. It is not a bug. There is no reason to backport it.
This commit is contained in:
parent
2a37cdbe6b
commit
784063eeb2
@ -142,6 +142,9 @@ flt_dump_kws(char **out)
|
||||
struct flt_kw_list *kwl;
|
||||
int index;
|
||||
|
||||
if (!out)
|
||||
return;
|
||||
|
||||
*out = NULL;
|
||||
list_for_each_entry(kwl, &flt_keywords.list, list) {
|
||||
for (index = 0; kwl->kw[index].kw != NULL; index++) {
|
||||
|
@ -1255,6 +1255,9 @@ void bind_dump_kws(char **out)
|
||||
struct bind_kw_list *kwl;
|
||||
int index;
|
||||
|
||||
if (!out)
|
||||
return;
|
||||
|
||||
*out = NULL;
|
||||
list_for_each_entry(kwl, &bind_keywords.list, list) {
|
||||
for (index = 0; kwl->kw[index].kw != NULL; index++) {
|
||||
|
@ -247,6 +247,9 @@ void srv_dump_kws(char **out)
|
||||
struct srv_kw_list *kwl;
|
||||
int index;
|
||||
|
||||
if (!out)
|
||||
return;
|
||||
|
||||
*out = NULL;
|
||||
list_for_each_entry(kwl, &srv_keywords.list, list) {
|
||||
for (index = 0; kwl->kw[index].kw != NULL; index++) {
|
||||
|
Loading…
Reference in New Issue
Block a user