sizeof on coffee_fd_set is no longer suitable since it has become a

pointer.
This commit is contained in:
nvt-se 2009-02-09 12:02:10 +00:00
parent f1fc4c879f
commit 98f7f9a06a

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, Swedish Institute of Computer Science
* Copyright (c) 2008, 2009, Swedish Institute of Computer Science
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -96,8 +96,10 @@
!HDR_OBSOLETE(hdr) && \
!HDR_ISOLATED(hdr))
#define COFFEE_PAGE_COUNT ((coffee_page_t)(COFFEE_SIZE / COFFEE_PAGE_SIZE))
#define COFFEE_PAGES_PER_SECTOR ((coffee_page_t)(COFFEE_SECTOR_SIZE / COFFEE_PAGE_SIZE))
#define COFFEE_PAGE_COUNT \
((coffee_page_t)(COFFEE_SIZE / COFFEE_PAGE_SIZE))
#define COFFEE_PAGES_PER_SECTOR \
((coffee_page_t)(COFFEE_SECTOR_SIZE / COFFEE_PAGE_SIZE))
struct file {
coffee_offset_t end;
@ -1177,7 +1179,9 @@ cfs_coffee_format(void)
watchdog_start();
/* All file descriptors have become invalid. */
memset(&coffee_fd_set, 0, sizeof(coffee_fd_set));
for(i = 0; i < COFFEE_FD_SET_SIZE; i++) {
coffee_fd_set[i].flags = COFFEE_FD_FREE;
}
PRINTF("done!\n");