From f1bf98f5efd3535a264264d6f57b1826fcca4f25 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 5 Nov 2010 12:44:53 +0100 Subject: make #includes simpler Signed-off-by: Denys Vlasenko --- inc/abrtlib.h | 8 +++++--- lib/utils/abrt_packages.c | 1 - src/cli/report.cpp | 3 --- src/daemon/MiddleWare.cpp | 1 - src/daemon/abrt-action-save-package-data.cpp | 1 - src/daemon/rpm.c | 8 ++++---- src/daemon/rpm.h | 7 ++----- 7 files changed, 11 insertions(+), 18 deletions(-) diff --git a/inc/abrtlib.h b/inc/abrtlib.h index c033f3f6..a665b10f 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -70,16 +70,18 @@ int vdprintf(int d, const char *format, va_list ap); #undef ARRAY_SIZE #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) -#include "abrt_types.h" #include "xfuncs.h" #include "logging.h" #include "read_write.h" #include "strbuf.h" -#include "crash_types.h" -#include "dump_dir.h" #include "hash_sha1.h" #include "hash_md5.h" +#include "crash_types.h" +#include "dump_dir.h" +#include "abrt_types.h" +#include "abrt_packages.h" + #ifdef __cplusplus extern "C" { diff --git a/lib/utils/abrt_packages.c b/lib/utils/abrt_packages.c index a64897fb..bbf0e729 100644 --- a/lib/utils/abrt_packages.c +++ b/lib/utils/abrt_packages.c @@ -17,7 +17,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "abrtlib.h" -#include "abrt_packages.h" /* cuts the name from the NVR format: foo-1.2.3-1.el6 returns a newly allocated string diff --git a/src/cli/report.cpp b/src/cli/report.cpp index b6edef9a..3da30e32 100644 --- a/src/cli/report.cpp +++ b/src/cli/report.cpp @@ -21,11 +21,8 @@ #include "run-command.h" #include "dbus.h" #include "abrtlib.h" -#include "crash_types.h" // FILENAME_* defines #include "plugin.h" // LoadPluginSettings -#include "abrt_packages.h" - /* Field separator for the crash report file that is edited by user. */ #define FIELD_SEP "%----" diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp index cc21602b..c02d5150 100644 --- a/src/daemon/MiddleWare.cpp +++ b/src/daemon/MiddleWare.cpp @@ -22,7 +22,6 @@ #include "Daemon.h" #include "Settings.h" #include "abrt_exception.h" -#include "abrt_packages.h" #include "comm_layer_inner.h" #include "MiddleWare.h" diff --git a/src/daemon/abrt-action-save-package-data.cpp b/src/daemon/abrt-action-save-package-data.cpp index d276d5e7..cb880bd3 100644 --- a/src/daemon/abrt-action-save-package-data.cpp +++ b/src/daemon/abrt-action-save-package-data.cpp @@ -18,7 +18,6 @@ */ #include #include "abrtlib.h" -#include "abrt_packages.h" #include "Settings.h" #include "rpm.h" #include "parse_options.h" diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c index b85de015..52ab8ac0 100644 --- a/src/daemon/rpm.c +++ b/src/daemon/rpm.c @@ -16,9 +16,9 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include "abrtlib.h" #include "rpm.h" -#include "abrt_packages.h" /** * A set, which contains finger prints. @@ -71,9 +71,9 @@ void rpm_load_gpgkey(const char* filename) free(pkt); } -bool rpm_chk_fingerprint(const char* pkg) +int rpm_chk_fingerprint(const char* pkg) { - bool ret = false; + int ret = 0; char *pgpsig = NULL; const char *errmsg = NULL; @@ -96,7 +96,7 @@ bool rpm_chk_fingerprint(const char* pkg) if (pgpsig_tmp) { pgpsig_tmp += sizeof(" Key ID ") - 1; - ret = g_list_find(list_fingerprints, pgpsig_tmp) != NULL; + ret = (g_list_find(list_fingerprints, pgpsig_tmp) != NULL); } } diff --git a/src/daemon/rpm.h b/src/daemon/rpm.h index 9b6b339c..4a82dee9 100644 --- a/src/daemon/rpm.h +++ b/src/daemon/rpm.h @@ -23,13 +23,9 @@ #define RPM_H_ #include -#include #include #include #include -#include - -#include "xfuncs.h" #ifdef __cplusplus extern "C" { @@ -57,8 +53,9 @@ void rpm_load_gpgkey(const char* filename); /** * A function, which checks if package's finger print is valid. * @param pkg A package name. + * @return 1 if valid, otherwise (invalid, or error) 0 */ -bool rpm_chk_fingerprint(const char* pkg); +int rpm_chk_fingerprint(const char* pkg); /** * Gets a package description. -- cgit