typecasts added in an attempt to please the picky compilers
authorDaniel Stenberg <daniel@haxx.se>
Tue, 20 Sep 2005 06:51:23 +0000 (06:51 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 20 Sep 2005 06:51:23 +0000 (06:51 +0000)
lib/tftp.c

index 891871d..29c13cb 100644 (file)
@@ -633,7 +633,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
       }
 
       /* The event is given by the TFTP packet time */
-      event = ntohs(state->rpacket.event);
+      event = (tftp_event_t)ntohs(state->rpacket.event);
 
       switch(event) {
       case TFTP_EVENT_DATA:
@@ -641,7 +641,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
                           (char *)state->rpacket.u.data.data, state->rbytes-4);
         break;
       case TFTP_EVENT_ERROR:
-        state->error = ntohs(state->rpacket.u.error.code);
+        state->error = (tftp_error_t)ntohs(state->rpacket.u.error.code);
         infof(conn->data, "%s\n", (char *)state->rpacket.u.error.data);
         break;
       case TFTP_EVENT_ACK: