[pacman-dev] [PATCH] Some options were refactored

Aaron Griffin aaronmgriffin at gmail.com
Fri Sep 25 00:29:03 EDT 2009


On Thu, Sep 24, 2009 at 11:17 PM, Allan McRae <allan at archlinux.org> wrote:
> Laszlo Papp wrote:
>>
>>    ./src/pacman/pacman.h:
>>        - The defines were placed here that are used in the
>>        pacman.c source file
>>    ./src/pacman/pacman.c
>>        - Long options were refactored because of a safer and more
>>        comfortable programming style, instead of hard coding
>>        10-15 or more integer value into the code
>
>
> Please try and make better commit messages.   The title tells me nothing
> about the patch and the description is not much better.

By way of example, I would have done something like:
-----
Replace hardcoded option numbers with #defines

pacman's long option parsing used hardcoded numbers to identify them. This
is not good practice, so replace them with #defined constants.

Signed-off-by: Skeletor
-----


More information about the pacman-dev mailing list