]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure the test for kernel version 2.6.22 will work correctly for the future kerne...
authorBart Van Assche <bvanassche@acm.org>
Thu, 1 May 2008 12:35:48 +0000 (12:35 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 1 May 2008 12:35:48 +0000 (12:35 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7971

coregrind/m_syswrap/syswrap-linux.c

index 235fb4e32ccf38afa465f3eb2410644044e4bb03..f885669330b245ddee319828a83b2913e90ba419 100644 (file)
@@ -1730,7 +1730,8 @@ static int linux_kernel_2_6_22(void)
     release[read] = 0;
     VG_(close)(fd);
     //VG_(printf)("kernel release = %s\n", release);
-    result = (VG_(strncmp)(release, "2.6.22", 6) == 0);
+    result = (VG_(strncmp)(release, "2.6.22", 6) == 0
+              && (release[6] < '0' || release[6] > '9'));
   }
   return result;
 }