aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2020-04-08 22:25:15 +0200
committerMaria Matejka <mq@ucw.cz>2020-04-09 15:37:14 +0200
commitfd9f0c0640fd02a26b96b4f9d3cbbffbb6544a84 (patch)
tree3cfac115f49d41f3d62d41c4ddfffe50f2c381a4 /lib
parenta109056145a6bc8a6b498ecb6e309ebc143c8b3c (diff)
downloadbird-fd9f0c0640fd02a26b96b4f9d3cbbffbb6544a84.tar.gz
Configuration strings are constant.
This is merely a const propagation. There was no problem in there.
Diffstat (limited to 'lib')
-rw-r--r--lib/socket.h4
-rw-r--r--lib/timer.c2
-rw-r--r--lib/timer.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/socket.h b/lib/socket.h
index f2b0c042..96fedeeb 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -76,7 +76,7 @@ typedef struct birdsock {
int rcv_ttl; /* TTL of last received datagram */
node n;
void *rbuf_alloc, *tbuf_alloc;
- char *password; /* Password for MD5 authentication */
+ const char *password; /* Password for MD5 authentication */
const char *err; /* Error message */
struct ssh_sock *ssh; /* Used in SK_SSH */
} sock;
@@ -106,7 +106,7 @@ int sk_leave_group(sock *s, ip_addr maddr); /* Leave multicast group on sk iface
int sk_setup_broadcast(sock *s);
int sk_set_ttl(sock *s, int ttl); /* Set transmit TTL for given socket */
int sk_set_min_ttl(sock *s, int ttl); /* Set minimal accepted TTL for given socket */
-int sk_set_md5_auth(sock *s, ip_addr local, ip_addr remote, int pxlen, struct iface *ifa, char *passwd, int setkey);
+int sk_set_md5_auth(sock *s, ip_addr local, ip_addr remote, int pxlen, struct iface *ifa, const char *passwd, int setkey);
int sk_set_ipv6_checksum(sock *s, int offset);
int sk_set_icmp6_filter(sock *s, int p1, int p2);
void sk_log_error(sock *s, const char *p);
diff --git a/lib/timer.c b/lib/timer.c
index ddf41340..be695114 100644
--- a/lib/timer.c
+++ b/lib/timer.c
@@ -253,7 +253,7 @@ timer_init(void)
* type &btime.
*/
btime
-tm_parse_time(char *x)
+tm_parse_time(const char *x)
{
struct tm tm;
int usec, n1, n2, n3, r;
diff --git a/lib/timer.h b/lib/timer.h
index 3b99825f..c5ea430c 100644
--- a/lib/timer.h
+++ b/lib/timer.h
@@ -106,7 +106,7 @@ void timer_init(void);
struct timeformat {
- char *fmt1, *fmt2;
+ const char *fmt1, *fmt2;
btime limit;
};
@@ -120,7 +120,7 @@ struct timeformat {
#define TM_DATETIME_BUFFER_SIZE 32 /* Buffer size required by tm_format_time() */
-btime tm_parse_time(char *x);
+btime tm_parse_time(const char *x);
void tm_format_time(char *x, struct timeformat *fmt, btime t);
int tm_format_real_time(char *x, size_t max, const char *fmt, btime t);