various coverity-inspired fixes

. some strncpy/strcpy to strlcpy conversions
	. new <minix/param.h> to avoid including other minix headers
	  that have colliding definitions with library and commands code,
	  causing parse warnings
	. removed some dead code / assignments
This commit is contained in:
Ben Gras
2012-07-16 13:17:11 +02:00
parent 77dbd766c1
commit cbcdb838f1
26 changed files with 89 additions and 80 deletions

View File

@@ -10,7 +10,6 @@
*/
#include <string.h>
#include <minix/endpoint.h>
#include "kernel/system.h"

View File

@@ -14,10 +14,9 @@
*/
#include <assert.h>
#include <minix/type.h>
#include <minix/safecopies.h>
#include "kernel/system.h"
#include "kernel.h"
#define MAX_INDIRECT_DEPTH 5 /* up to how many indirect grants to follow? */

View File

@@ -12,11 +12,10 @@
#include <assert.h>
#include <minix/type.h>
#include <minix/type.h>
#include <minix/safecopies.h>
#include "kernel/system.h"
#include "kernel.h"
#include <minix/safecopies.h>
#include <signal.h>
@@ -119,9 +118,8 @@ int map_invoke_vm(struct proc * caller,
endpoint_t end_s, vir_bytes off_s,
size_t size, int flag)
{
struct proc *src, *dst;
struct proc *dst;
src = endpoint_lookup(end_s);
dst = endpoint_lookup(end_d);
/* Make sure the linear addresses are both page aligned. */