[pacman-dev] [PATCH 1/3] Remove redundant include alpm_list.h in src/pacman/*.c

Dan McGee dpmcgee at gmail.com
Wed Jul 1 01:02:46 EDT 2009


On Sat, Jun 6, 2009 at 2:27 PM, Gerardo Exequiel
Pozzi<vmlinuz386 at yahoo.com.ar> wrote:
> Gerardo Exequiel Pozzi wrote:
>> These files include alpm.h, but alpm.h include alpm_list.h
>> so the second inclusion is redundant.
>>
>> Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
>> ---
>>  src/pacman/deptest.c |    1 -
>>  src/pacman/package.c |    1 -
>>  src/pacman/pacman.c  |    1 -
>>  src/pacman/query.c   |    1 -
>>  src/pacman/remove.c  |    1 -
>>  src/pacman/sync.c    |    1 -
>>  src/pacman/upgrade.c |    1 -
>>  src/pacman/util.c    |    1 -
>>  8 files changed, 0 insertions(+), 8 deletions(-)
>>
>> diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
>> index 2feca5c..cbbbbe7 100644
>> --- a/src/pacman/deptest.c
>> +++ b/src/pacman/deptest.c
>> @@ -24,7 +24,6 @@
>>  #include <string.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/package.c b/src/pacman/package.c
>> index da2feb5..b44cf81 100644
>> --- a/src/pacman/package.c
>> +++ b/src/pacman/package.c
>> @@ -27,7 +27,6 @@
>>  #include <wchar.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "package.h"
>> diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
>> index 72a72ba..d44a371 100644
>> --- a/src/pacman/pacman.c
>> +++ b/src/pacman/pacman.c
>> @@ -43,7 +43,6 @@
>>
>>  /* alpm */
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/query.c b/src/pacman/query.c
>> index 809a5f4..f2b2afd 100644
>> --- a/src/pacman/query.c
>> +++ b/src/pacman/query.c
>> @@ -28,7 +28,6 @@
>>  #include <unistd.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/remove.c b/src/pacman/remove.c
>> index 1968744..63d9ea0 100644
>> --- a/src/pacman/remove.c
>> +++ b/src/pacman/remove.c
>> @@ -23,7 +23,6 @@
>>  #include <stdio.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/sync.c b/src/pacman/sync.c
>> index 68fb81a..9154839 100644
>> --- a/src/pacman/sync.c
>> +++ b/src/pacman/sync.c
>> @@ -28,7 +28,6 @@
>>  #include <sys/stat.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
>> index 2c99688..971e47c 100644
>> --- a/src/pacman/upgrade.c
>> +++ b/src/pacman/upgrade.c
>> @@ -24,7 +24,6 @@
>>  #include <string.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "pacman.h"
>> diff --git a/src/pacman/util.c b/src/pacman/util.c
>> index a280252..7b63d6f 100644
>> --- a/src/pacman/util.c
>> +++ b/src/pacman/util.c
>> @@ -36,7 +36,6 @@
>>  #include <wchar.h>
>>
>>  #include <alpm.h>
>> -#include <alpm_list.h>
>>
>>  /* pacman */
>>  #include "util.h"
>>
> Hi Dan,
>
> I have a question, what about these patches, will be included, or not
> yet seen it?
> I question this because a I see some activity in the last four days in
> pacman.git. Is necesary to resend the three patches?

So better late then never here.

Yes, redundant, but no, not obviously "extra" or anything like that.
These extra imports don't hurt as all headers are correctly fenced, so
we don't actually include anything twice, so I'd rather keep it the
way it is.

In addition, it is quite possible we could change the header layout so
suddenly alpm.h did not include the list functions (not the type), and
then things would break.

-Dan


More information about the pacman-dev mailing list