From: Panu Matilainen Date: Wed, 21 Apr 2010 10:00:43 +0000 (+0300) Subject: Lose the useless header refcounting debug junk X-Git-Tag: rpm-4.9.0-beta1~648 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb772e2cad8ed79fb4d1b971bd10842381102ea7;p=platform%2Fupstream%2Frpm.git Lose the useless header refcounting debug junk - one more of these still left behind.. pff --- diff --git a/lib/header.c b/lib/header.c index 1aa451b..f4578de 100644 --- a/lib/header.c +++ b/lib/header.c @@ -16,8 +16,6 @@ #include "debug.h" -int _hdr_debug = 0; - /** \ingroup header */ const unsigned char rpm_header_magic[8] = { @@ -123,21 +121,15 @@ static uint64_t htonll( uint64_t n ) { Header headerLink(Header h) { - if (h == NULL) return NULL; - - h->nrefs++; -if (_hdr_debug) -fprintf(stderr, "--> h %p ++ %d at %s:%u\n", h, h->nrefs, __FILE__, __LINE__); - + if (h != NULL) + h->nrefs++; return h; } Header headerUnlink(Header h) { - if (h == NULL) return NULL; -if (_hdr_debug) -fprintf(stderr, "--> h %p -- %d at %s:%u\n", h, h->nrefs, __FILE__, __LINE__); - h->nrefs--; + if (h != NULL) + h->nrefs--; return NULL; } diff --git a/lib/poptALL.c b/lib/poptALL.c index 2e0fc05..7966756 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -32,8 +32,6 @@ extern int _rpmds_nopromote; extern int _fsm_debug; -extern int _hdr_debug; - extern int _print_pkts; extern int _psm_debug; @@ -215,8 +213,6 @@ struct poptOption rpmcliAllPoptTable[] = { { "fsmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_fsm_debug, -1, N_("debug payload file state machine"), NULL}, - { "hdrdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_hdr_debug, -1, - NULL, NULL}, { "prtpkts", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_print_pkts, -1, NULL, NULL}, { "rpmfcdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmfc_debug, -1,