yanhan / powaur

An AUR helper with a pacman-like interface
GNU General Public License v2.0
8 stars 3 forks source link

Add NoConfirm config file option #4

Closed tadzik closed 13 years ago

yanhan commented 13 years ago

Hey hi,

The noconfirm field in struct config_t happens to be a bitfield of size 1 bit.

Based on a small program I wrote, if we were to subtract 1 from a 1 bit bitfield originally initialized to 0, it will wrap around to have the value 1 instead.

Ok I shouldn't have used bitfields in the first place. But could you change:

--config->noconfirm;

to: config->noconfirm = 0;

and ++config->noconfirm;

to config->noconfirm = 1;

instead? I'm pretty sure that'll work as well.

Thanks!

tadzik commented 13 years ago

Sure thing :) I was just emulating your approach, I thought you might have had something tricky on your mind. I'll update my patch in a while.

yanhan commented 13 years ago

Hey tadzik,

I'm really really really really sorry. I don't really check github and there's no email sent to me regarding this. I'll merge this by tonight on top of some other changes I have in mind.

Thanks =)

yanhan commented 13 years ago

Hi Tadzik,

I squashed your two patches into one. My master branch has been updated. Really sorry about this.

Thanks for the addition!

tadzik commented 13 years ago

No problem with that, thanks for taking care of it :)