PERFORCE change 178112 for review
Garrett Cooper
gcooper at FreeBSD.org
Tue May 11 18:20:45 UTC 2010
http://p4web.freebsd.org/@@178112?ac=10
Change 178112 by gcooper at starr-bastion on 2010/05/11 18:20:16
Actually fix the compile because the perforce reverted the changes -_-...
Affected files ...
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#15 edit
Differences ...
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#15 (text+ko) ====
@@ -412,11 +412,11 @@
* NOTE (gcooper): No sense in calloc'ing destfile or srcfile as the
* first byte is zeroed out below in the archive add loop.
*/
- if ((destfile = malloc(PATH_MAX, sizeof(char))) == NULL ||
+ if ((destfile = malloc(PATH_MAX * sizeof(char))) == NULL ||
(destbase = calloc(PATH_MAX, sizeof(char))) == NULL ||
(prefix = calloc(PATH_MAX, sizeof(char))) == NULL ||
(srcbase = calloc(PATH_MAX, sizeof(char))) == NULL ||
- (srcfile = malloc(PATH_MAX, sizeof(char))) == NULL)
+ (srcfile = malloc(PATH_MAX * sizeof(char))) == NULL)
error = strerror(errno);
/*
* If the package tarball exists already, and we are running in
@@ -573,7 +573,7 @@
if (strlcpy(srcbase, BaseDir,
PATH_MAX) > PATH_MAX)
error = strerror(ENAMETOOLONG);
-
+ }
if (strlcpy(srcbase, prefix, PATH_MAX) >
PATH_MAX)
error = strerror(ENAMETOOLONG);
@@ -588,7 +588,7 @@
/* First @cwd -- wewt! */
if (prefix == NULL) {
- if (strlen(p->name) > MAX_PATH)
+ if (strlen(p->name) > PATH_MAX)
error = strerror(ENAMETOOLONG);
else {
More information about the p4-projects
mailing list