freebsd-ports/sysutils/htop/files/patch-UptimeMeter.c
Philip M. Gollucci b1e12b65f0 - pull some upstream svn fixes
o simply the code
  o lsof failure checks
  o coverity fixes

PR:             ports/143222
Submitted by:   Hung-Yi Chen <gaod@hychen.org>
Approved by:    maintainer timeout (yzlin ; 220 days)
2010-09-08 22:51:55 +00:00

11 lines
346 B
C

--- UptimeMeter.c.orig 2010-01-26 04:26:23.000000000 +0800
+++ UptimeMeter.c 2010-01-26 04:27:01.000000000 +0800
@@ -19,7 +19,7 @@
};
static void UptimeMeter_setValues(Meter* this, char* buffer, int len) {
- double uptime;
+ double uptime = 0;
FILE* fd = fopen(PROCDIR "/uptime", "r");
fscanf(fd, "%lf", &uptime);
fclose(fd);