[pacman-dev] [PATCH] Refactor do-while cycle in the api, util.c

Dan McGee dpmcgee at gmail.com
Thu Nov 12 03:20:59 EST 2009

On Wed, Nov 11, 2009 at 3:08 PM, Laszlo Papp <djszapi at archlinux.us> wrote:
> * It makes the code clearer to read/understand
> * Cppcheck tool doesn't show this anymore: [./util.c:215]: (error) Resource leak: fd
> ---
>  lib/libalpm/util.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)

I have no idea why it doesn't apply cleanly, but I'm not going to bust
my butt at 2am working on this. Can you grab the raw email and apply
it yourself to a clean master?

Most likely it is the whitespace change you tried to sneak in there,
as I don't see any whitespace after the "-" in the actual email body.
If you resubmit without that this will get applied.

And argh, now I'm rambling, but why didn't we fix the ones in trans.c,
the other one in util.c, pacman.c, etc?


dmcgee at galway ~/projects/pacman (master)
$ git am -3 -s < /tmp/do-while.patch
Applying: Refactor do-while cycle in the api, util.c
Using index info to reconstruct a base tree...
error: patch failed: lib/libalpm/util.c:315
error: lib/libalpm/util.c: patch does not apply
Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Cannot fall back to three-way merge.
Patch failed at 0001 Refactor do-while cycle in the api, util.c
When you have resolved this problem run "git am -3 --resolved".
If you would prefer to skip this patch, instead run "git am -3 --skip".
To restore the original branch and stop patching run "git am -3 --abort".

More information about the pacman-dev mailing list