summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Papp <djszapi2@gmail.com>2009-09-16 21:22:11 +0200
committerDan McGee <dan@archlinux.org>2009-09-20 11:52:50 -0500
commit6685822e575797b1e38a1e9364b72bb6bca2f52f (patch)
tree587a46fb69d783fd45b666795517f1490b0256ff
parent44cddb351b05bd629202b7cf9294c71852a542a9 (diff)
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>
-rw-r--r--src/pacman/package.c2
-rw-r--r--src/pacman/pacman.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 328d5bf6..3b145164 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -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);
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 16990957..4c556a7d 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -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, ',');