--- a/libparted/arch/linux.c	2011-05-27 14:52:37.000000000 +0200
+++ b/libparted/arch/linux.c	2011-07-29 20:25:38.000000000 +0200
@@ -601,17 +601,17 @@
         static int kver = -1;
 
         struct utsname uts;
-        int major;
-        int minor;
-        int teeny;
+        int major = 0;
+        int minor = 0;
+        int teeny = 0;
 
         if (kver != -1)
                 return kver;
 
         if (uname (&uts))
                 return kver = 0;
-        if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3)
-                return kver = 0;
+        int n = sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny);
+        assert (n == 2 || n == 3);
 
         return kver = KERNEL_VERSION (major, minor, teeny);
 }