[pacman-dev] [PATCH] Rename config option and small typo fix
./src/pacman/package.c: - small typo fix ./src/pacman/pacman.c: - config option is renamed to configfile, because it's more talkative like in case of logfile. - strdup is changed to strndup, because it's safer like in case of config option Signed-off-by: Laszlo Papp <djszapi2@gmail.com> --- src/pacman/package.c | 2 +- src/pacman/pacman.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pacman/package.c b/src/pacman/package.c index 328d5bf..3b14516 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 64598b0..8a93fd8 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -379,7 +379,7 @@ static int parseargs(int argc, char *argv[]) {"downloadonly", no_argument, 0, 'w'}, {"refresh", no_argument, 0, 'y'}, {"noconfirm", no_argument, 0, 1000}, - {"config", required_argument, 0, 1001}, + {"configfile", required_argument, 0, 1001}, {"ignore", required_argument, 0, 1002}, {"debug", optional_argument, 0, 1003}, {"noprogressbar", no_argument, 0, 1004}, @@ -454,7 +454,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, ','); -- 1.6.4.1
On Mon, Sep 14, 2009 at 8:37 PM, Laszlo Papp <djszapi2@gmail.com> wrote:
./src/pacman/package.c: - small typo fix ./src/pacman/pacman.c: - config option is renamed to configfile, because it's more talkative like in case of logfile. I like everything here but this. For one, it has been this way for a loooong time, so I don't see a reason to change it. Two, you didn't update the docs. :)
If you resubmit with just the other two changes, I'll merge it.
- strdup is changed to strndup, because it's safer like in case of config option
Signed-off-by: Laszlo Papp <djszapi2@gmail.com> --- src/pacman/package.c | 2 +- src/pacman/pacman.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
participants (2)
-
Dan McGee
-
Laszlo Papp