2005-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	* bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
	errors reporting style.
	* strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
	* system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
	* util.c (printstr): Likewise.
	(dumpiov) [HAVE_SYS_UIO_H]: Likewise.
	(fixvfork) [SUNOS4]: Likewise.
	* desc.c (decode_select): Continue to decode syscall arguments
	in case of OOM condition.
	* file.c (sys_getdents): Likewise.
	(sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
	(sys_getdirentries) [FREEBSD]: Likewise.
	* mem.c (sys_mincore): Changed type of variables which deal with
	malloc size from int to unsigned long.
	Fixes RH#159308.
diff --git a/mem.c b/mem.c
index 7404ef2..fbc26da 100644
--- a/mem.c
+++ b/mem.c
@@ -504,7 +504,7 @@
 sys_mincore(tcp)
 struct tcb *tcp;
 {
-	int i, len;
+	unsigned long i, len;
 	char *vec = NULL;
 
 	if (entering(tcp)) {
@@ -512,7 +512,7 @@
 	} else {
 		len = tcp->u_arg[1];
 		if (syserror(tcp) || tcp->u_arg[2] == 0 ||
-			(vec = malloc((u_int)len)) == NULL ||
+			(vec = malloc(len)) == NULL ||
 			umoven(tcp, tcp->u_arg[2], len, vec) < 0)
 			tprintf("%#lx", tcp->u_arg[2]);
 		else {