Changeset 8fdb18e in mainline for uspace/app/dnsres/dnsres.c


Ignore:
Timestamp:
2013-05-03T14:51:30Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/dnsres/dnsres.c

    ref904895 r8fdb18e  
    3434
    3535#include <errno.h>
     36#include <inet/addr.h>
    3637#include <inet/dnsr.h>
    3738#include <stdio.h>
     
    4344{
    4445        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;
    5946}
    6047
     
    7663        }
    7764
    78         rc = addr_format(&hinfo->addr, &saddr);
     65        rc = inet_addr_format(&hinfo->addr, &saddr);
    7966        if (rc != EOK) {
    8067                dnsr_hostinfo_destroy(hinfo);
Note: See TracChangeset for help on using the changeset viewer.