svn commit: [26087] trunk/busybox/modutils

vda at busybox.net vda at busybox.net
Mon Apr 13 20:32:31 UTC 2009


Author: vda
Date: 2009-04-13 20:32:31 +0000 (Mon, 13 Apr 2009)
New Revision: 26087

Log:
modutils: remove redundant sanitization



Modified:
   trunk/busybox/modutils/modutils.c


Changeset:
Modified: trunk/busybox/modutils/modutils.c
===================================================================
--- trunk/busybox/modutils/modutils.c	2009-04-13 18:58:35 UTC (rev 26086)
+++ trunk/busybox/modutils/modutils.c	2009-04-13 20:32:31 UTC (rev 26087)
@@ -5,7 +5,6 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
-
 #include "modutils.h"
 
 #ifdef __UCLIBC__
@@ -111,9 +110,9 @@
 
 int FAST_FUNC bb_init_module(const char *filename, const char *options)
 {
-	size_t len = MAXINT(ssize_t);
+	size_t len;
 	char *image;
-	int rc = ENOENT;
+	int rc;
 
 	if (!options)
 		options = "";
@@ -124,10 +123,12 @@
 #endif
 
 	/* Use the 2.6 way */
+	len = INT_MAX - 4095;
+	rc = ENOENT;
 	image = xmalloc_open_zipped_read_close(filename, &len);
 	if (image) {
 		rc = 0;
-		if (init_module(image, len, options ? options : "") != 0)
+		if (init_module(image, len, options) != 0)
 			rc = errno;
 		free(image);
 	}



More information about the busybox-cvs mailing list