the manpage says that memcpy can never return an error
authorPhilipp Tölke <toelke@in.tum.de>
Tue, 20 Jul 2010 19:53:54 +0000 (19:53 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Tue, 20 Jul 2010 19:53:54 +0000 (19:53 +0000)
src/vpn/gnunet-daemon-vpn.c

index b003d7b531e30a3266edd646fd83aa790d51567e..e90a2aa9c6511c5454ab914b2ccca4486d3ff398 100644 (file)
@@ -102,10 +102,7 @@ static void helper_read(void* cls, const struct GNUNET_SCHEDULER_TaskContext* ts
 
        struct suid_packet *pkt = (struct suid_packet*) GNUNET_malloc(ntohl(hdr.size));
 
-       if (memcpy(pkt, &hdr, sizeof(struct suid_packet_header)) < 0) {
-               fprintf(stderr, "Memcpy: %m\n");
-               return;
-       }
+       memcpy(pkt, &hdr, sizeof(struct suid_packet_header));
 
        while (r < ntohl(pkt->hdr.size)) {
                int t = GNUNET_DISK_file_read(mycls->fh_from_helper, (unsigned char*)pkt + r, ntohl(pkt->hdr.size) - r);