INN commit: trunk (5 files)
INN Commit
rra at isc.org
Sun Jan 7 14:39:53 UTC 2018
Date: Sunday, January 7, 2018 @ 06:39:53
Author: iulius
Revision: 10219
Fix a few shadow GCC warnings for variable naming
Modified:
trunk/backends/actsync.c
trunk/backends/archive.c
trunk/innd/cc.c
trunk/lib/network-innbind.c
trunk/storage/cnfs/cnfs.c
-----------------------+
backends/actsync.c | 8 ++++----
backends/archive.c | 14 +++++++-------
innd/cc.c | 4 ++--
lib/network-innbind.c | 6 +++---
storage/cnfs/cnfs.c | 16 ++++++++--------
5 files changed, 24 insertions(+), 24 deletions(-)
Modified: backends/actsync.c
===================================================================
--- backends/actsync.c 2018-01-07 14:38:49 UTC (rev 10218)
+++ backends/actsync.c 2018-01-07 14:39:53 UTC (rev 10219)
@@ -320,7 +320,7 @@
int *errs);
static int bad_grpname(char *name, int num_chk);
static struct pat *get_ignore(char *filename, int *len);
-static void ignore(struct grp *, int grplen, struct pat *, int iglen);
+static void ignore_grps(struct grp *, int grplen, struct pat *, int iglen);
static int merge_cmp(const void *, const void *);
static void merge_grps(struct grp *, int grplen, char *host1, char *host2);
static int active_cmp(const void *, const void *);
@@ -364,7 +364,7 @@
ignor = get_ignore(ign_file, &iglen);
/* ignore groups */
- ignore(grp, grplen, ignor, iglen);
+ ignore_grps(grp, grplen, ignor, iglen);
}
/* compare groups from both hosts */
@@ -1410,7 +1410,7 @@
}
/*
- * ignore - ignore newsgroups given an ignore list
+ * ignore_grps - ignore newsgroups given an ignore list
*
* given:
* grp array of groups
@@ -1419,7 +1419,7 @@
* iglen length of igcl array in elements
*/
static void
-ignore(struct grp *grp, int grplen, struct pat *igcl, int iglen)
+ignore_grps(struct grp *grp, int grplen, struct pat *igcl, int iglen)
{
struct grp *gp; /* current group element being examined */
struct pat *pp; /* current pattern element being examined */
Modified: backends/archive.c
===================================================================
--- backends/archive.c 2018-01-07 14:38:49 UTC (rev 10218)
+++ backends/archive.c 2018-01-07 14:39:53 UTC (rev 10219)
@@ -92,7 +92,7 @@
** to concatenate the message to the end of an existing file if any.
*/
static bool
-write_article(ARTHANDLE *article, const char *file, bool concat)
+write_article(ARTHANDLE *article, const char *file, bool concatenate)
{
FILE *out;
char *text = NULL;
@@ -99,13 +99,13 @@
size_t length = 0;
/* Open the output file. */
- out = fopen(file, concat ? "a" : "w");
+ out = fopen(file, concatenate ? "a" : "w");
if (out == NULL && errno == ENOENT) {
if (!mkpath(file)) {
syswarn("cannot mkdir for %s", file);
return false;
}
- out = fopen(file, concat ? "a" : "w");
+ out = fopen(file, concatenate ? "a" : "w");
}
if (out == NULL) {
syswarn("cannot open %s for writing", file);
@@ -114,12 +114,12 @@
/* Get the data in wire format and write it out to the file. */
text = wire_to_native(article->data, article->len, &length);
- if (concat)
+ if (concatenate)
fprintf(out, "-----------\n");
if (fwrite(text, length, 1, out) != 1) {
syswarn("cannot write to %s", file);
fclose(out);
- if (!concat)
+ if (!concatenate)
unlink(file);
free(text);
return false;
@@ -130,13 +130,13 @@
if (ferror(out) || fflush(out) == EOF) {
syswarn("cannot flush %s", file);
fclose(out);
- if (!concat)
+ if (!concatenate)
unlink(file);
return false;
}
if (fclose(out) == EOF) {
syswarn("cannot close %s", file);
- if (!concat)
+ if (!concatenate)
unlink(file);
return false;
}
Modified: innd/cc.c
===================================================================
--- innd/cc.c 2018-01-07 14:38:49 UTC (rev 10218)
+++ innd/cc.c 2018-01-07 14:39:53 UTC (rev 10219)
@@ -822,7 +822,7 @@
static const char *
CCmode(char *unused[] UNUSED)
{
- int count, index;
+ int count, i;
#ifdef DO_PERL
char *stats;
@@ -851,7 +851,7 @@
buffer_append_sprintf(&CCreply, "Allowing remote connections\n");
/* Server parameters. */
- for (count = 0, index = 0; CHANiter(&index, CTnntp) != NULL; )
+ for (count = 0, i = 0; CHANiter(&i, CTnntp) != NULL; )
count++;
buffer_append_sprintf(&CCreply, "Parameters c %lu i %lu (%d) l %lu o %d"
" t %ld H %d T %d X %ld %s %s\n",
Modified: lib/network-innbind.c
===================================================================
--- lib/network-innbind.c 2018-01-07 14:38:49 UTC (rev 10218)
+++ lib/network-innbind.c 2018-01-07 14:39:53 UTC (rev 10219)
@@ -51,11 +51,11 @@
*/
#ifdef HAVE_STREAMS_SENDFD
static socket_type
-network_recvfd(int pipe)
+network_recvfd(int streams_pipe)
{
struct strrecvfd fdrec;
- if (ioctl(pipe, I_RECVFD, &fdrec) < 0) {
+ if (ioctl(streams_pipe, I_RECVFD, &fdrec) < 0) {
syswarn("cannot receive file descriptor from innbind");
return INVALID_SOCKET;
} else
@@ -63,7 +63,7 @@
}
#else /* !HAVE_STREAMS_SENDFD */
static socket_type
-network_recvfd(int pipe UNUSED)
+network_recvfd(int streams_pipe UNUSED)
{
return INVALID_SOCKET;
}
Modified: storage/cnfs/cnfs.c
===================================================================
--- storage/cnfs/cnfs.c 2018-01-07 14:38:49 UTC (rev 10218)
+++ storage/cnfs/cnfs.c 2018-01-07 14:39:53 UTC (rev 10219)
@@ -927,7 +927,7 @@
if (flags == MS_INVALIDATE) {
msync(start, end - start, flags);
} else {
- static char *sstart, *send;
+ static char *start2, *end2;
/* Don't thrash the system with msync()s - keep the last value
* and check each time, only if the pages which we should
@@ -934,13 +934,13 @@
* flush change actually flush the previous ones. Calling
* cnfs_mapcntl(NULL, 0, MS_ASYNC) then flushes the final
* piece. */
- if (start != sstart || end != send) {
- if (sstart != NULL && send != NULL) {
- msync(sstart, send - sstart, flags);
- }
- sstart = start;
- send = end;
- }
+ if (start != start2 || end != end2) {
+ if (start2 != NULL && end2 != NULL) {
+ msync(start2, end2 - start2, flags);
+ }
+ start2 = start;
+ end2 = end;
+ }
}
}
More information about the inn-committers
mailing list