enable scrub on Debian
[libguestfs.git] / hivex / hivexsh.c
index 6d83f0d..332b773 100644 (file)
@@ -184,7 +184,6 @@ main (int argc, char *argv[])
 
     char *cmd = buf;
     char *args;
-    size_t i = 0;
 
     if (buf[len] == '\0') {
       /* This is mostly safe.  Although the cmd_* functions do sometimes
@@ -801,7 +800,8 @@ cmd_lsval (char *key)
       case hive_t_full_resource_description:
       case hive_t_resource_requirements_list:
       default: {
-        char *data = hivex_value_value (h, values[i], &t, &len);
+        unsigned char *data =
+          (unsigned char *) hivex_value_value (h, values[i], &t, &len);
         if (!data)
           goto error;
 
@@ -913,7 +913,7 @@ cmd_setval (char *nrvals_str)
     }
     else if (STRPREFIX (buf, "expandstring:")) {
       buf += 13;
-      values[i].t = hive_t_string;
+      values[i].t = hive_t_expand_string;
       int nr_chars = strlen (buf);
       values[i].len = 2 * (nr_chars + 1);
       values[i].value = malloc (values[i].len);