diff options
author | Eric Andersen | 2006-01-30 22:48:39 +0000 |
---|---|---|
committer | Eric Andersen | 2006-01-30 22:48:39 +0000 |
commit | a68ea1cb93c29125bc4f30ddd415fca02249e010 (patch) | |
tree | 5741be315758b807145c24da9ff3a1dbf8fce4e8 /networking | |
parent | 9a58b02ec75caafb7214f1ad0317f9a4830cbd2a (diff) | |
download | busybox-a68ea1cb93c29125bc4f30ddd415fca02249e010.zip busybox-a68ea1cb93c29125bc4f30ddd415fca02249e010.tar.gz |
fix up yet more annoying signed/unsigned and mixed type errors
Diffstat (limited to 'networking')
-rw-r--r-- | networking/udhcp/dhcpc.c | 8 | ||||
-rw-r--r-- | networking/udhcp/packet.c | 2 | ||||
-rw-r--r-- | networking/udhcp/serverpacket.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index a4afb0c..8568ac1 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) client_config.clientid[OPT_CODE] = DHCP_CLIENT_ID; client_config.clientid[OPT_LEN] = len; client_config.clientid[OPT_DATA] = '\0'; - strncpy(client_config.clientid + OPT_DATA, optarg, len); + strncpy((char*)client_config.clientid + OPT_DATA, optarg, len); break; case 'C': if (client_config.clientid) show_usage(); @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) client_config.vendorclass = xmalloc(len + 2); client_config.vendorclass[OPT_CODE] = DHCP_VENDOR; client_config.vendorclass[OPT_LEN] = len; - strncpy(client_config.vendorclass + OPT_DATA, optarg, len); + strncpy((char*)client_config.vendorclass + OPT_DATA, optarg, len); break; case 'f': client_config.foreground = 1; @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) client_config.hostname = xmalloc(len + 2); client_config.hostname[OPT_CODE] = DHCP_HOST_NAME; client_config.hostname[OPT_LEN] = len; - strncpy(client_config.hostname + 2, optarg, len); + strncpy((char*)client_config.hostname + 2, optarg, len); break; case 'F': len = strlen(optarg) > 255 ? 255 : strlen(optarg); @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) client_config.fqdn[OPT_LEN + 1] = 0x1; client_config.fqdn[OPT_LEN + 2] = 0; client_config.fqdn[OPT_LEN + 3] = 0; - strncpy(client_config.fqdn + 5, optarg, len); + strncpy((char*)client_config.fqdn + 5, optarg, len); break; case 'i': client_config.interface = optarg; diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 64a9100..1baec55 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c @@ -70,7 +70,7 @@ int get_packet(struct dhcpMessage *packet, int fd) if (packet->op == BOOTREQUEST && (vendor = get_option(packet, DHCP_VENDOR))) { for (i = 0; broken_vendors[i][0]; i++) { if (vendor[OPT_LEN - 2] == (uint8_t) strlen(broken_vendors[i]) && - !strncmp(vendor, broken_vendors[i], vendor[OPT_LEN - 2])) { + !strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - 2])) { DEBUG(LOG_INFO, "broken client (%s), forcing broadcast", broken_vendors[i]); packet->flags |= htons(BROADCAST_FLAG); diff --git a/networking/udhcp/serverpacket.c b/networking/udhcp/serverpacket.c index 1b89862..fe880b4 100644 --- a/networking/udhcp/serverpacket.c +++ b/networking/udhcp/serverpacket.c @@ -98,9 +98,9 @@ static void add_bootp_options(struct dhcpMessage *packet) { packet->siaddr = server_config.siaddr; if (server_config.sname) - strncpy(packet->sname, server_config.sname, sizeof(packet->sname) - 1); + strncpy((char*)packet->sname, server_config.sname, sizeof(packet->sname) - 1); if (server_config.boot_file) - strncpy(packet->file, server_config.boot_file, sizeof(packet->file) - 1); + strncpy((char*)packet->file, server_config.boot_file, sizeof(packet->file) - 1); } |