From fb772e2cad8ed79fb4d1b971bd10842381102ea7 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 21 Apr 2010 13:00:43 +0300 Subject: Lose the useless header refcounting debug junk - one more of these still left behind.. pff --- lib/header.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lib/header.c') diff --git a/lib/header.c b/lib/header.c index 1aa451b80..f4578de74 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; } -- cgit v1.2.3