* allocate a file structure
*
*/
-static struct open_file_t *allocate_file()
+static struct open_file_t *allocate_file(void)
{
- struct open_file_t *file;
- int i = 0;
+ struct open_file_t *file = Files;
+ int i;
- file = (struct open_file_t *)Files;
- for (; i < MAX_OPEN; i ++ ) {
+ for (i = 0; i < MAX_OPEN; i++) {
if ( file->file_sector == 0 ) /* found it */
return file;
- file ++;
+ file++;
}
return NULL; /* not found */
* return the socket pointer if success, or null if failure
*
*/
-static struct open_file_t* allocate_socket()
+static struct open_file_t *allocate_socket(void)
{
extern uint16_t NextSocket;
uint16_t i = MAX_OPEN;
- struct open_file_t *socket = (struct open_file_t *)&Files;
+ struct open_file_t *socket = Files;
for (; i > 0; i--) {
if (*(uint16_t*)socket == 0)
break;
- socket ++;
+ socket++;
}
/* Not found */
};
static struct tftp_options tftp_options[2];
-static inline void init_options()
+static inline void init_options(void)
{
tftp_options[0].str_ptr = tsize_str;
tftp_options[0].str_len = tsize_len;
return 0;
}
-static int memory_scan_for_pxe_struct()
+static int memory_scan_for_pxe_struct(void)
{
extern uint16_t BIOS_fbm; /* Starting segment */
uint16_t seg = BIOS_fbm << (10 - 4);
return memory_scan(seg, is_pxe);
}
-static int memory_scan_for_pxenv_struct()
+static int memory_scan_for_pxenv_struct(void)
{
uint16_t seg = 0x1000;
* if if the API version is 2.1 or later
*
*/
-static void pxe_init()
+static void pxe_init(void)
{
char plan = 'A';
uint16_t seg, off;
/*
* Network-specific initialization
*/
-static void network_init()
+static void network_init(void)
{
struct bootp_t *bp = (struct bootp_t *)trackbuf;
int pkt_len;