Commit 9ed03e72 authored by Jan Včelák's avatar Jan Včelák 🚀

libknot: remove uint typedef

parent 3e28560d
......@@ -127,7 +127,7 @@ static char *error_messages[(-ZC_ERR_UNKNOWN) + 1] = {
void err_handler_init(err_handler_t *h)
{
memset(h, 0, sizeof(err_handler_t));
memset(h->errors, 0, sizeof(uint) * (-ZC_ERR_UNKNOWN + 1));
memset(h->errors, 0, sizeof(unsigned) * (-ZC_ERR_UNKNOWN + 1));
h->options.log_cname = 0;
h->options.log_glue = 0;
h->options.log_rrsigs = 0;
......
......@@ -133,8 +133,8 @@ struct handler_options {
struct err_handler {
/* Consider moving error messages here */
struct handler_options options; /*!< Handler options. */
uint errors[(-ZC_ERR_UNKNOWN) + 1]; /*!< Array with error messages */
uint error_count; /*!< Total error count */
unsigned errors[(-ZC_ERR_UNKNOWN) + 1]; /*!< Array with error messages */
unsigned error_count; /*!< Total error count */
};
typedef struct err_handler err_handler_t;
......
......@@ -94,7 +94,7 @@ static int knot_zone_diff_add_node(const zone_node_t *node,
changeset_t *changeset)
{
/* Add all rrsets from node. */
for (uint i = 0; i < node->rrset_count; i++) {
for (unsigned i = 0; i < node->rrset_count; i++) {
knot_rrset_t rrset = node_rrset_at(node, i);
int ret = changeset_add_rrset(changeset, &rrset);
if (ret != KNOT_EOK) {
......@@ -111,7 +111,7 @@ static int knot_zone_diff_remove_node(changeset_t *changeset,
const zone_node_t *node)
{
/* Remove all the RRSets of the node. */
for (uint i = 0; i < node->rrset_count; i++) {
for (unsigned i = 0; i < node->rrset_count; i++) {
knot_rrset_t rrset = node_rrset_at(node, i);
int ret = changeset_rem_rrset(changeset, &rrset);
if (ret != KNOT_EOK) {
......@@ -270,7 +270,7 @@ static int knot_zone_diff_node(zone_node_t **node_ptr, void *data)
param->changeset);
}
for (uint i = 0; i < node->rrset_count; i++) {
for (unsigned i = 0; i < node->rrset_count; i++) {
/* Search for the RRSet in the node from the second tree. */
knot_rrset_t rrset = node_rrset_at(node, i);
......@@ -299,7 +299,7 @@ static int knot_zone_diff_node(zone_node_t **node_ptr, void *data)
}
}
for (uint i = 0; i < node_in_second_tree->rrset_count; i++) {
for (unsigned i = 0; i < node_in_second_tree->rrset_count; i++) {
/* Search for the RRSet in the node from the second tree. */
knot_rrset_t rrset = node_rrset_at(node_in_second_tree, i);
......
......@@ -34,11 +34,6 @@
#define _public_ __attribute__((visibility("default")))
#define _hidden_ __attribute__((visibility("hidden")))
#ifndef KNOT_UINT_DEFINED
typedef unsigned int uint; /*!< \brief Unsigned. */
#define KNOT_UINT_DEFINED
#endif
/*! \brief Eliminate compiler warning with unused parameters. */
#define KNOT_UNUSED(param) (void)(param)
......
......@@ -238,7 +238,7 @@ char *knot_dname_to_str(char *dst, const knot_dname_t *name, size_t maxlen)
uint8_t label_len = 0;
size_t str_len = 0;
for (uint i = 0; i < dname_size; i++) {
for (unsigned i = 0; i < dname_size; i++) {
uint8_t c = name[i];
/* Read next label size. */
......@@ -600,7 +600,7 @@ int knot_dname_matched_labels(const knot_dname_t *d1, const knot_dname_t *d2)
/*----------------------------------------------------------------------------*/
_public_
knot_dname_t *knot_dname_replace_suffix(const knot_dname_t *name, uint labels,
knot_dname_t *knot_dname_replace_suffix(const knot_dname_t *name, unsigned labels,
const knot_dname_t *suffix)
{
if (name == NULL)
......
......@@ -258,7 +258,7 @@ int knot_dname_matched_labels(const knot_dname_t *d1, const knot_dname_t *d2);
* \return New domain name created by replacing suffix of \a dname of size
* \a size with \a suffix.
*/
knot_dname_t *knot_dname_replace_suffix(const knot_dname_t *name, uint labels,
knot_dname_t *knot_dname_replace_suffix(const knot_dname_t *name, unsigned labels,
const knot_dname_t *suffix);
/*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment