Strndup usage and small typo fix

./src/pacman/package.c:
       - small typo fix
   ./src/pacman/pacman.c:
       - strdup is changed to strndup, because it's safer like in
       case of config option

Signed-off-by: Laszlo Papp <djszapi2@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Laszlo Papp 2009-09-16 21:22:11 +02:00 committed by Dan McGee
parent 44cddb351b
commit 6685822e57
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
}
if(level>0) {
/* compute this here so we don't get a puase in the middle of output */
/* compute this here so we don't get a pause in the middle of output */
requiredby = alpm_pkg_compute_requiredby(pkg);
}

View File

@ -437,7 +437,7 @@ static int parseargs(int argc, char *argv[])
config->flags |= PM_TRANS_FLAG_ALLDEPS;
break;
case 1009:
config->logfile = strdup(optarg);
config->logfile = strndup(optarg, PATH_MAX);
break;
case 1010:
list = strsplit(optarg, ',');