summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/KerneloopsScanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plugins/KerneloopsScanner.cpp')
-rw-r--r--lib/Plugins/KerneloopsScanner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp
index 05e2a18..e95f259 100644
--- a/lib/Plugins/KerneloopsScanner.cpp
+++ b/lib/Plugins/KerneloopsScanner.cpp
@@ -12,7 +12,7 @@
#include <asm/unistd.h>
-#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
#define FILENAME_KERNELOOPS "kerneloops"
void CKerneloopsScanner::WriteSysLog(int m_nCount)
@@ -118,13 +118,13 @@ void CKerneloopsScanner::ScanSysLogFile(const char *filename, int issyslog)
* to /var/log/messages before we read it in... we try to
* deal with it by reading at most 1023 bytes extra. If there's
* more than that.. any oops will be in dmesg anyway.
- * Do not try to allocate an absurt amount of memory; ignore
+ * Do not try to allocate an absurd amount of memory; ignore
* older log messages because they are unlikely to have
* sufficiently recent data to be useful. 32MB is more
* than enough; it's not worth looping through more log
* if the log is larger than that.
*/
- buflen = MAX(statb.st_size+1024, 32*1024*1024);
+ buflen = MIN(statb.st_size+1024, 32*1024*1024);
buffer = (char*)calloc(buflen, 1);
assert(buffer != NULL);