Changeset 8fdb18e in mainline for uspace/app/dnsres/dnsres.c
- Timestamp:
- 2013-05-03T14:51:30Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d1cb8a
- Parents:
- ef904895 (diff), 1c7ba2d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/dnsres/dnsres.c
ref904895 r8fdb18e 34 34 35 35 #include <errno.h> 36 #include <inet/addr.h> 36 37 #include <inet/dnsr.h> 37 38 #include <stdio.h> … … 43 44 { 44 45 printf("syntax: " NAME " <host-name>\n"); 45 }46 47 static int addr_format(inet_addr_t *addr, char **bufp)48 {49 int rc;50 51 rc = asprintf(bufp, "%d.%d.%d.%d", addr->ipv4 >> 24,52 (addr->ipv4 >> 16) & 0xff, (addr->ipv4 >> 8) & 0xff,53 addr->ipv4 & 0xff);54 55 if (rc < 0)56 return ENOMEM;57 58 return EOK;59 46 } 60 47 … … 76 63 } 77 64 78 rc = addr_format(&hinfo->addr, &saddr);65 rc = inet_addr_format(&hinfo->addr, &saddr); 79 66 if (rc != EOK) { 80 67 dnsr_hostinfo_destroy(hinfo);
Note:
See TracChangeset
for help on using the changeset viewer.