summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorGrant Erickson <marathon96@gmail.com>2012-07-16 09:48:10 -0700
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-07-17 10:15:21 +0200
commitb0bf545cb5e34abc9e0cb19065fddd6b895218ba (patch)
tree430db1ff42272806cb05a98f2af0a855996e3d9b /gweb
parent42e3cd5263c245ae4f9e454160a35b2267475183 (diff)
downloadconnman-b0bf545cb5e34abc9e0cb19065fddd6b895218ba.tar.gz
connman-b0bf545cb5e34abc9e0cb19065fddd6b895218ba.tar.bz2
connman-b0bf545cb5e34abc9e0cb19065fddd6b895218ba.zip
gresolv: Use predefined mnemonics rather than magic numbers
Use predefined mnemonics from arpa/nameserv.h for the return value from ns_msg_getflag rather than magic numbers.
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gresolv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gweb/gresolv.c b/gweb/gresolv.c
index d96f345b..79abc9b7 100644
--- a/gweb/gresolv.c
+++ b/gweb/gresolv.c
@@ -652,22 +652,22 @@ static void parse_response(struct resolv_nameserver *nameserver,
ns_msg_id(msg), rcode, count);
switch (rcode) {
- case 0:
+ case ns_r_noerror:
status = G_RESOLV_RESULT_STATUS_SUCCESS;
break;
- case 1:
+ case ns_r_formerr:
status = G_RESOLV_RESULT_STATUS_FORMAT_ERROR;
break;
- case 2:
+ case ns_r_servfail:
status = G_RESOLV_RESULT_STATUS_SERVER_FAILURE;
break;
- case 3:
+ case ns_r_nxdomain:
status = G_RESOLV_RESULT_STATUS_NAME_ERROR;
break;
- case 4:
+ case ns_r_notimpl:
status = G_RESOLV_RESULT_STATUS_NOT_IMPLEMENTED;
break;
- case 5:
+ case ns_r_refused:
status = G_RESOLV_RESULT_STATUS_REFUSED;
break;
default: