Miscellaneous code cleanup.

This commit is contained in:
Kees van Reeuwijk
2010-03-22 20:43:06 +00:00
parent 4b2310a7ee
commit c33102ea6b
20 changed files with 38 additions and 44 deletions

View File

@@ -806,11 +806,9 @@ udp_fd_t *udp_fd;
return NW_SUSPEND;
}
PRIVATE int udp_sel_read (udp_fd)
udp_fd_t *udp_fd;
PRIVATE int udp_sel_read (udp_fd_t *udp_fd)
{
acc_t *pack, *tmp_acc, *next_acc;
int result;
acc_t *tmp_acc, *next_acc;
if (!(udp_fd->uf_flags & UFF_OPTSET))
return 1; /* Read will not block */

View File

@@ -287,7 +287,6 @@ PUBLIC int do_semctl(message *m)
unsigned short *buf;
struct semid_ds *ds, tmp_ds;
struct sem_struct *sem;
struct semaphore *semaphore;
id = m->SEMCTL_ID;
num = m->SEMCTL_NUM;

View File

@@ -184,10 +184,9 @@ PUBLIC void update_refcount_and_destroy(void)
*===========================================================================*/
PUBLIC int do_shmdt(message *m)
{
struct shm_struct *shm;
vir_bytes addr;
phys_bytes paddr;
int n, i;
int i;
addr = m->SHMDT_ADDR;

View File

@@ -26,7 +26,7 @@ PUBLIC void rproc_dmp()
{
struct rproc *rp;
struct rprocpub *rpub;
int i,j, n=0;
int i, n=0;
static int prev_i=0;
getsysinfo(RS_PROC_NR, SI_PROCPUB_TAB, rprocpub);

View File

@@ -13,8 +13,8 @@
* maximum number of ids the filesystem can
* handle */
#define NO_ADDRESS -1 /* Error constants */
#define NO_FREE_INODES -1
#define NO_ADDRESS (-1) /* Error constants */
#define NO_FREE_INODES (-1)
#define PATH_PENULTIMATE 001 /* parse_path stops at last but one name */
#define PATH_NONSYMBOLIC 004 /* parse_path scans final name if symbolic */

View File

@@ -41,7 +41,7 @@ void **buf;
int *vec_grants;
vir_bytes bytes;
{
int access = 0, size;
int size;
int j;
iovec_t *v;
static iovec_t new_iovec[NR_IOREQS];

View File

@@ -1,6 +1,4 @@
#include "inc.h"
#include <string.h>
#include <minix/com.h>
#include <minix/vfsif.h>
#include <minix/ds.h>
#include "const.h"
@@ -71,14 +69,14 @@ PUBLIC int fs_readsuper() {
/*===========================================================================*
* fs_mountpoint *
*===========================================================================*/
PUBLIC int fs_mountpoint() {
PUBLIC int fs_mountpoint()
{
/* This function looks up the mount point, it checks the condition whether
* the partition can be mounted on the inode or not.
*/
register struct dir_record *rip;
int r = OK;
mode_t bits;
/* Temporarily open the file. */
if ((rip = get_dir_record(fs_m_in.REQ_INODE_NR)) == NULL)

View File

@@ -89,7 +89,7 @@ PUBLIC int do_select(void)
* timeout and wait for either the file descriptors to become ready or the
* timer to go off. If no timeout value was provided, we wait indefinitely. */
int r, nfds, do_timeout = 0, nonzero_timeout = 0, fd, s;
int r, nfds, do_timeout = 0, fd, s;
struct timeval timeout;
struct selectentry *se;