Lose the useless header refcounting debug junk
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 21 Apr 2010 10:00:43 +0000 (13:00 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 21 Apr 2010 10:00:43 +0000 (13:00 +0300)
- one more of these still left behind.. pff

lib/header.c
lib/poptALL.c

index 1aa451b..f4578de 100644 (file)
@@ -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;
 }
 
index 2e0fc05..7966756 100644 (file)
@@ -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,