From 27870bd4deceff8396bbc569927716773b1aea29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 27 Oct 2020 11:03:02 +0100 Subject: [PATCH] Drop unneeded variablw initialization and reduce scope --- linux/LinuxProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 5195c616..5d9bc3c4 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -482,7 +482,6 @@ static bool LinuxProcessList_readSmapsFile(LinuxProcess* process, const char* di char buffer[CRT_pageSize];// 4k char *start,*end; ssize_t nread=0; - int tmp=0; if(haveSmapsRollup) {// only available in Linux 4.14+ xSnprintf(buffer, sizeof(buffer), "%s/%s/smaps_rollup", dirname, name); } else { @@ -500,6 +499,7 @@ static bool LinuxProcessList_readSmapsFile(LinuxProcess* process, const char* di start = (char *)&buffer; end = start + nread; do{//parse 4k block + int tmp; if( (tmp = (end - start)) > 0 && (start = memmem(start,tmp,"\nPss:",5)) != NULL )