start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>
[oweals/busybox.git] / networking / tftp.c
index e1e278aba3de464171610b03cb0ee760a050b939..b20486cc13b854fa422eaaa105a2b01a5e82f0a0 100644 (file)
@@ -280,13 +280,13 @@ static int tftp( USE_GETPUT(const int cmd,)
                                "no such user",
                                "bad option",
                        };
-                       enum { NUM_ERRCODE = sizeof(errcode_str) / sizeof(errcode_str[0]) };
+
                        const char *msg = "";
 
                        if (rbuf[4] != '\0') {
                                msg = &rbuf[4];
                                rbuf[tftp_bufsize - 1] = '\0';
-                       } else if (recv_blk < NUM_ERRCODE) {
+                       } else if (recv_blk < ARRAY_SIZE(errcode_str)) {
                                msg = errcode_str[recv_blk];
                        }
                        bb_error_msg("server error: (%u) %s", recv_blk, msg);
@@ -353,7 +353,7 @@ static int tftp( USE_GETPUT(const int cmd,)
                                /* Server lost our TFTP_ACK.  Resend it */
                                block_nr = recv_blk;
                                continue;
-                       } 
+                       }
                }
 
                if (CMD_PUT(cmd) && (opcode == TFTP_ACK)) {