Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-08 08:14:29 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-08 08:14:29 +0000
commit3e608e7e858166a15eb929df4d66f35f5e4689c5 (patch)
tree59ac5f7f827d93f26246aae16af47a65c9926137 /src
parent55f178c629ada663d2a8e5bbed029ec9482f00ea (diff)
* Improved mcheck output
* Added minor libalpm const correctness * Mini-memory fixes
Diffstat (limited to 'src')
-rw-r--r--src/pacman/Makefile.am2
-rw-r--r--src/pacman/pacman.c20
2 files changed, 7 insertions, 15 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index fdfac1eb..0e11d82f 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = po
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-AM_CFLAGS = -D_GNU_SOURCE \
+AM_CFLAGS = $(CFLAGS) -D_GNU_SOURCE \
-I$(top_srcdir)/lib/libalpm \
-I$(top_srcdir)/lib/libfetch
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 1708d371..30d28f72 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -91,21 +91,21 @@ void mcheck_abort(enum mcheck_status status)
switch(status)
{
case MCHECK_DISABLED:
- fputs("mcheck: disabled, no checking can be done", stderr);
+ fputs("mcheck: disabled, no checking can be done\n", stderr);
break;
case MCHECK_OK:
fputs("mcheck: block ok", stderr);
break;
case MCHECK_HEAD:
- fputs("mcheck: inconsistancy at block head (underrun)", stderr);
+ fputs("mcheck: inconsistancy at block head (underrun)\n", stderr);
abort();
break;
case MCHECK_TAIL:
- fputs("mcheck: inconsistancy at block tail (overrun)", stderr);
+ fputs("mcheck: inconsistancy at block tail (overrun)\n", stderr);
abort();
break;
case MCHECK_FREE:
- fputs("mcheck: block has already been freed", stderr);
+ fputs("mcheck: block has already been freed\n", stderr);
break;
};
}
@@ -235,11 +235,6 @@ static void cleanup(int signum)
FREELIST(pm_targets);
FREECONF(config);
-#if defined(PACMAN_DEBUG) && !defined(CYGWIN) && !defined(BSD)
- /* debug */
- muntrace();
-#endif
-
if(neednl) {
putchar('\n');
}
@@ -354,7 +349,7 @@ static int parseargs(int argc, char *argv[])
break;
case 'b':
if(config->dbpath) {
- free(config->dbpath);
+ FREE(config->dbpath);
}
config->dbpath = strdup(optarg);
break;
@@ -442,11 +437,8 @@ int main(int argc, char *argv[])
list_t *lp;
#if defined(PACMAN_DEBUG) && !defined(CYGWIN) && !defined(BSD)
- /* debug */
- mtrace();
- mcheck(0);
+ mcheck(mcheck_abort);
#endif
-
cenv = getenv("COLUMNS");
if(cenv != NULL) {
maxcols = atoi(cenv);