From 8ba0c4db632a7a97bab36abda02be57c74dbfb6c Mon Sep 17 00:00:00 2001 From: Nicholas Brown Date: Wed, 13 Dec 2017 14:52:39 +0000 Subject: [PATCH] Remove unused variables --- src/osdep/linux/sysinfo.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/osdep/linux/sysinfo.cpp b/src/osdep/linux/sysinfo.cpp index 75e0987..9c6d2fa 100644 --- a/src/osdep/linux/sysinfo.cpp +++ b/src/osdep/linux/sysinfo.cpp @@ -16,31 +16,7 @@ // small hack to access environ variable conforming to the GNU way #define environ __environ -#define STAT_FILE "/proc/stat" -static int stat_fd = -1; -#define UPTIME_FILE "/proc/uptime" -static int uptime_fd = -1; - long smp_num_cpus; /* number of CPUs */ -static char buf[1024]; - -/* This macro opens filename only if necessary and seeks to 0 so - * that successive calls to the functions are more efficient. - * It also reads the current contents of the file into the global buf. - */ -#define FILE_TO_BUF(filename, fd) do{ \ - static int local_n; \ - if (fd == -1 && (fd = open(filename, O_RDONLY)) == -1) { \ - THROWEXCEPTION("error: /proc must be mounted!"); \ - } \ - lseek(fd, 0L, SEEK_SET); \ - if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \ - perror(filename); \ - fflush(NULL); \ - _exit(103); \ - } \ - buf[local_n] = '\0'; \ -}while(0) /*********************************************************************** * Some values in /proc are expressed in units of 1/HZ seconds, where HZ