runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit e0f48258bb2ff9f65524530771d4f6f4b2948384
parent e9acfe21da51e95ea09fbccefe5c7c502bef4799
Author: Érico Rolim <erico.erc@gmail.com>
Date:   Sun, 16 Aug 2020 15:12:35 -0300

svlogd.c: Clear dir struct.

Diffstat:
Msrc/svlogd.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/svlogd.c b/src/svlogd.c @@ -705,6 +705,7 @@ int main(int argc, const char **argv) { coe(fdwdir); dir =(struct logdir*)alloc(dirn *sizeof(struct logdir)); if (! dir) die_nomem(); + memset(dir, 0, dirn * sizeof(struct logdir)); for (i =0; i < dirn; ++i) { dir[i].fddir =-1; dir[i].fdcur =-1; dir[i].btmp =(char*)alloc(buflen *sizeof(char));