aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-06-06 20:09:48 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-06-07 20:44:44 +0200
commitf9e8ee0777c257ffd2956a6dd51e866dff26bc8e (patch)
tree048a78b97301e3cac3e1d79bf4dff78bba351c33 /conf.c
parentc919bbbdd370f86af37e18ca991c936d3bf36cfa (diff)
downloadpasst-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar.gz
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar.bz2
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar.lz
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar.xz
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.tar.zst
passt-f9e8ee0777c257ffd2956a6dd51e866dff26bc8e.zip
lineread: Use ssize_t for line lengths
Functions and structures in lineread.c use plain int to record and report the length of lines we receive. This means we truncate the result from read(2) in some circumstances. Use ssize_t to avoid that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index fdeb9db..3998bfa 100644
--- a/conf.c
+++ b/conf.c
@@ -401,9 +401,9 @@ static void get_dns(struct ctx *c)
struct fqdn *s = c->dns_search;
struct lineread resolvconf;
unsigned int added = 0;
+ ssize_t line_len;
char *line, *end;
const char *p;
- int line_len;
dns4_set = !c->ifi4 || !IN4_IS_ADDR_UNSPECIFIED(dns4);
dns6_set = !c->ifi6 || !IN6_IS_ADDR_UNSPECIFIED(dns6);