]> pd.if.org Git - zpackage/blobdiff - lib/integ.c
fix bugs reported by static analyzer
[zpackage] / lib / integ.c
index 6abfcf340cff7087ea82a75c9e83cffd215fa130..57e7d87936bfd29417587248c9acb01f674ef352 100644 (file)
@@ -127,6 +127,10 @@ static void hash_query(struct zpm *zpm, const char *zSql, struct sha256_state *h
                                        hash_byte(h, 'B');
                                        hash_int(h, bytes);
                                        break;
+                               default:
+                                       hash_byte(h, 'U');
+                                       continue;
+                                       break;
                        }
                        sha256_process(h, data, bytes);
                }
@@ -155,7 +159,7 @@ int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash) {
        /* hash package files */
 
        sql = sqlite3_mprintf("select path, mode, username, groupname, configuration, "
-               "filetype, target, devmajor, devminor, mtime, hash "
+               "filetype, target, device, mtime, hash "
                "from packagefiles_pkgid where pkgid = %Q order by path",
                pkgid);
        hash_query(zpm, sql, &d);