setup: use the value not the index when updating an entry
authorKay Sievers <kay@vrfy.org>
Fri, 3 May 2013 19:23:33 +0000 (21:23 +0200)
committerKay Sievers <kay@vrfy.org>
Fri, 3 May 2013 19:24:14 +0000 (21:24 +0200)
src/setup/setup.c

index 9c95dc7..75bd8e8 100644 (file)
@@ -859,7 +859,7 @@ static int find_slot(const uint8_t uuid[16], const char *path, uint16_t *id) {
         /* find already existing gummiboot entry */
         for (i = 0; i < n_options; i++)
                 if (same_entry(options[i], uuid, path)) {
-                        new_id = i;
+                        new_id = options[i];
                         existing = true;
                         goto finish;
                 }