This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.

View the commit online.

commit b2c2f89f6d6bb2ef08c3e61a33c2f443a96275fd
Author: Alastair Poole <m...@alastairpoole.com>
AuthorDate: Wed Mar 5 19:58:40 2025 +0000

    process: fix potential bug.
    
    boot_time can potentially be returned uninitialised.
---
 src/bin/system/process.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index c440bd6..5405908 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -273,7 +273,7 @@ static int64_t
 _boot_time(void)
 {
    FILE *f;
-   int64_t boot_time;
+   int64_t boot_time = 0;
    char buf[4096];
    double uptime = 0.0;
 
@@ -282,7 +282,6 @@ _boot_time(void)
 
    if (fgets(buf, sizeof(buf), f))
      sscanf(buf, "%lf", &uptime);
-   else boot_time = 0;
 
    fclose(f);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to