summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Osterried <thomas@osterried.de>2012-10-01 16:16:37 +0000
committerThomas Osterried <thomas@osterried.de>2012-10-01 16:16:37 +0000
commit55118b82cab84a6c426e455cf028136a92c9c41f (patch)
treeb68be7831d71449e9e69d7bb873b50de1aa4c137
parent8cb88af8894399f3b68f9e027f8f6f4fc5575686 (diff)
renamed variable "restrict" to "route_restrict"
debian Bug#689322: "restrict" is a keyword in C99 tcpip/rip98d.c uses "restrict" as a variable name. This collides with the fact that in C99 "restrict" is a keyword. Compilers that default to C99-mode, or gcc -std=c99, fail to compile this code.
-rw-r--r--tcpip/rip98d.c10
-rw-r--r--tcpip/rip98d.h2
-rw-r--r--tcpip/rip98r.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/tcpip/rip98d.c b/tcpip/rip98d.c
index e40f21b..8688177 100644
--- a/tcpip/rip98d.c
+++ b/tcpip/rip98d.c
@@ -32,9 +32,9 @@ struct dest_struct dest_list[50];
int dest_count = 0;
-int debug = FALSE;
-int restrict = FALSE;
-int logging = FALSE;
+int debug = FALSE;
+int route_restrict = FALSE;
+int logging = FALSE;
struct route_struct *first_route = NULL;
@@ -203,7 +203,7 @@ static int read_routes(void)
continue;
}
- if (restrict) {
+ if (route_restrict) {
if (inet_netof(address) != 44) {
if (debug && logging)
syslog(LOG_DEBUG, "rejecting route to %s/%ld - not ampr.org\n", inet_ntoa(address), netmask);
@@ -286,7 +286,7 @@ int main(int argc, char **argv)
logging = TRUE;
break;
case 'r':
- restrict = TRUE;
+ route_restrict = TRUE;
break;
case 't':
interval = atoi(optarg) * 60;
diff --git a/tcpip/rip98d.h b/tcpip/rip98d.h
index fb00a7d..fc4ef8f 100644
--- a/tcpip/rip98d.h
+++ b/tcpip/rip98d.h
@@ -44,7 +44,7 @@ extern struct dest_struct dest_list[];
extern int dest_count;
extern int debug;
-extern int restrict;
+extern int route_restrict;
extern int logging;
/* In rip98d.c */
diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c
index 9a623ff..f8d8090 100644
--- a/tcpip/rip98r.c
+++ b/tcpip/rip98r.c
@@ -128,7 +128,7 @@ void receive_routes(int s)
continue;
}
- if (restrict) {
+ if (route_restrict) {
if (network != 44) {
if (debug && logging)
syslog(LOG_DEBUG, " route to %s/%d metric %d - rejected\n", inet_ntoa(addr), bits, metric);