From 59665ba2e96832dc3e8314a7c22d4a6773763b08 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Wed, 30 Sep 2009 22:52:52 +0000 Subject: [PATCH] corrected for LINUX --- src/frontend/com_sysinfo.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/frontend/com_sysinfo.c b/src/frontend/com_sysinfo.c index 93a4bc0cc..bf48e86cc 100644 --- a/src/frontend/com_sysinfo.c +++ b/src/frontend/com_sysinfo.c @@ -40,6 +40,7 @@ #define TesError int #define TES_FAIL 1 #define TES_SUCCESS 0 +#define TES_INVALID_PARAMS 1 /* system info */ typedef struct TSI { @@ -208,15 +209,8 @@ tInt searchInSet(const tInt *set, tInt size, tInt match) { return 0; } -TESAPI void TESAPIENTRY tesFreeSystemInfo(TesSystemInfo *info) { - if(info != NULL) { - free(info->cpuModelName); - free(info->osName); - } -} - /* Get system information */ -TESAPI TesError TESAPIENTRY tesCreateSystemInfo(TesSystemInfo *info) { +TesError tesCreateSystemInfo(TesSystemInfo *info) { FILE *file; TesError error = TES_SUCCESS; @@ -347,17 +341,17 @@ TESAPI TesError TESAPIENTRY tesCreateSystemInfo(TesSystemInfo *info) { } /* another test to get number of logical processors */ - if {info->numLogicalProcessors == 0) { + if (info->numLogicalProcessors == 0) { char* token; char* cpustr = copy(inStr); while (cpustr) - if cieq(gettok(&cpustr), "processor") { + if (cieq(gettok(&cpustr), "processor")) { gettok(&cpustr); token = gettok(&cpustr); } info->numLogicalProcessors = atoi(token) + 1; - tfree cpustr; + tfree(cpustr); } free(inStr);