chiark / gitweb /
resolver: Break out adns_initflags value as variable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 May 2020 17:36:26 +0000 (18:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 May 2020 19:47:04 +0000 (20:47 +0100)
This provides a single place to add flags, which we'll do in a moment.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
resolver.c

index 3a6ad5a..45738ea 100644 (file)
@@ -210,12 +210,14 @@ static list_t *adnsresolver_apply(closure_t *self, struct cloc loc,
     d=i->data.dict;
     conf=dict_read_string(d,"config",False,"adns",loc);
 
+    adns_initflags iflags = 0;
+
     if (conf) {
-       if (adns_init_strcfg(&st->ast, 0, 0, conf)) {
+       if (adns_init_strcfg(&st->ast, iflags, 0, conf)) {
            fatal_perror("Failed to initialise ADNS");
        }
     } else {
-       if (adns_init(&st->ast, 0, 0)) {
+       if (adns_init(&st->ast, iflags, 0)) {
            fatal_perror("Failed to initialise ADNS");
        }
     }