#include "system.h"
#include <netdb.h>
+#include <errno.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmstring.h>
#include "lib/header_internal.h"
#include "lib/misc.h" /* tag function proto */
+#include <errno.h>
#include "debug.h"
/** \ingroup header
{
indexEntry entry;
rpm_data_t data;
- int length;
+ int length = 0;
/* Count must always be >= 1 for headerAddEntry. */
if (td->count <= 0)
if (hdrchkData(td->count))
return 0;
- length = 0;
data = grabData(td->type, td->data, td->count, &length);
- if (data == NULL || length <= 0)
+ if (data == NULL)
return 0;
/* Allocate more index space if necessary */
indexEntry entry;
rpm_data_t oldData;
rpm_data_t data;
- int length;
+ int length = 0;
/* First find the tag */
entry = findEntry(h, td->tag, td->type);
if (!entry)
return 0;
- length = 0;
data = grabData(td->type, td->data, td->count, &length);
- if (data == NULL || length <= 0)
+ if (data == NULL)
return 0;
/* make sure entry points to the first occurence of this tag */