summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/plist.c6
-rw-r--r--lib/termtable.c6
-rw-r--r--lib/vrf.h8
-rw-r--r--lib/zebra.h12
4 files changed, 16 insertions, 16 deletions
diff --git a/lib/plist.c b/lib/plist.c
index f8dd7df0be..ee68fbc0f1 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -1252,13 +1252,13 @@ static int vty_show_prefix_list_prefix(struct vty *vty, afi_t afi,
if (pentry->any)
vty_out(vty, "any");
else {
- struct prefix *p = &pentry->prefix;
+ struct prefix *pf = &pentry->prefix;
char buf[BUFSIZ];
vty_out(vty, "%s/%d",
- inet_ntop(p->family, p->u.val, buf,
+ inet_ntop(pf->family, pf->u.val, buf,
BUFSIZ),
- p->prefixlen);
+ pf->prefixlen);
if (pentry->ge)
vty_out(vty, " ge %d", pentry->ge);
diff --git a/lib/termtable.c b/lib/termtable.c
index 7bdb1ff873..4f5f9ff218 100644
--- a/lib/termtable.c
+++ b/lib/termtable.c
@@ -140,8 +140,8 @@ static struct ttable_cell *ttable_insert_row_va(struct ttable *tt, int i,
int ncols = 0;
/* count how many columns we have */
- for (int i = 0; format[i]; i++)
- ncols += !!(format[i] == '|');
+ for (int j = 0; format[j]; j++)
+ ncols += !!(format[j] == '|');
ncols++;
if (tt->ncols == 0)
@@ -459,7 +459,7 @@ char *ttable_dump(struct ttable *tt, const char *newline)
memcpy(&buf[pos], left, lsize);
pos += lsize;
- for (size_t i = 0; i < width - lsize - rsize; i++)
+ for (size_t l = 0; l < width - lsize - rsize; l++)
buf[pos++] = row[0].style.border.bottom;
pos -= width - lsize - rsize;
diff --git a/lib/vrf.h b/lib/vrf.h
index c962ac4c69..f0dabf5b24 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -111,8 +111,8 @@ extern vrf_id_t vrf_name_to_id(const char *);
#define VRF_GET_ID(V, NAME, USE_JSON) \
do { \
- struct vrf *vrf; \
- if (!(vrf = vrf_lookup_by_name(NAME))) { \
+ struct vrf *_vrf; \
+ if (!(_vrf = vrf_lookup_by_name(NAME))) { \
if (USE_JSON) { \
vty_out(vty, "{}\n"); \
} else { \
@@ -120,7 +120,7 @@ extern vrf_id_t vrf_name_to_id(const char *);
} \
return CMD_WARNING; \
} \
- if (vrf->vrf_id == VRF_UNKNOWN) { \
+ if (_vrf->vrf_id == VRF_UNKNOWN) { \
if (USE_JSON) { \
vty_out(vty, "{}\n"); \
} else { \
@@ -128,7 +128,7 @@ extern vrf_id_t vrf_name_to_id(const char *);
} \
return CMD_WARNING; \
} \
- (V) = vrf->vrf_id; \
+ (V) = _vrf->vrf_id; \
} while (0)
/*
diff --git a/lib/zebra.h b/lib/zebra.h
index d80aa06935..4e0e408ea6 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -333,18 +333,18 @@ struct in_pktinfo {
#endif
#define MAX(a, b) \
({ \
- typeof(a) _a = (a); \
- typeof(b) _b = (b); \
- _a > _b ? _a : _b; \
+ typeof(a) _max_a = (a); \
+ typeof(b) _max_b = (b); \
+ _max_a > _max_b ? _max_a : _max_b; \
})
#ifdef MIN
#undef MIN
#endif
#define MIN(a, b) \
({ \
- typeof(a) _a = (a); \
- typeof(b) _b = (b); \
- _a < _b ? _a : _b; \
+ typeof(a) _min_a = (a); \
+ typeof(b) _min_b = (b); \
+ _min_a < _min_b ? _min_a : _min_b; \
})
#ifndef offsetof