Commit 91c3935e authored by Aurelio Colosimo's avatar Aurelio Colosimo

/etc/ppsi.conf read loop: fix next_r variable computation

Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 728b2b2a
......@@ -59,7 +59,7 @@ int main(int argc, char **argv)
conf_buf = calloc(1, conf_fs.st_size + 1);
do {
next_r = conf_fs.st_size - r;
next_r = conf_fs.st_size - conf_len;
r = read(conf_fd, &conf_buf[conf_len], next_r);
if (r <= 0)
break;
......
......@@ -75,7 +75,7 @@ int main(int argc, char **argv)
conf_buf = calloc(1, conf_fs.st_size + 1);
do {
next_r = conf_fs.st_size - r;
next_r = conf_fs.st_size - conf_len;
r = read(conf_fd, &conf_buf[conf_len], next_r);
if (r <= 0)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment