diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-11-08 09:14:29 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-11-08 09:14:29 +0100 |
commit | 3e608e7e858166a15eb929df4d66f35f5e4689c5 (patch) | |
tree | 59ac5f7f827d93f26246aae16af47a65c9926137 /src | |
parent | 55f178c629ada663d2a8e5bbed029ec9482f00ea (diff) | |
download | pacman-3e608e7e858166a15eb929df4d66f35f5e4689c5.tar.gz pacman-3e608e7e858166a15eb929df4d66f35f5e4689c5.tar.xz |
* Improved mcheck output
* Added minor libalpm const correctness
* Mini-memory fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/Makefile.am | 2 | ||||
-rw-r--r-- | src/pacman/pacman.c | 20 |
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); |