>From 92291a3a67bd18dacca99b3fd5b3768c76f6c63d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 6 Feb 2016 09:54:06 +0000 Subject: [PATCH 3/4] inspection: Stylistic updates. --- src/inspect-fs-windows.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c index 4ae1f79..343ade9 100644 --- a/src/inspect-fs-windows.c +++ b/src/inspect-fs-windows.c @@ -627,7 +627,6 @@ map_registry_disk_blob_gpt (guestfs_h *g, const void *blob) size_t i; parts = guestfs_list_partitions (g); - if (parts == NULL) return NULL; @@ -638,32 +637,28 @@ map_registry_disk_blob_gpt (guestfs_h *g, const void *blob) CLEANUP_FREE char *type = NULL; partnum = guestfs_part_to_partnum (g, parts[i]); - if (partnum == -1) - continue; + continue; device = guestfs_part_to_dev (g, parts[i]); - if (device == NULL) - continue; + continue; type = guestfs_part_get_parttype (g, device); - if (type == NULL) - continue; + continue; if (STRCASENEQ (type, "gpt")) - continue; + continue; /* get the GPT parition GUID from the partition block device */ fs_guid = guestfs_part_get_gpt_guid (g, device, partnum); - if (fs_guid == NULL) continue; - /* if both GUIDs match, we have found mapping for out device */ + /* if both GUIDs match, we have found the mapping for our device */ if (STRCASEEQ (fs_guid, blob_guid)) - return safe_strdup (g, parts[i]); + return safe_strdup (g, parts[i]); } return NULL; @@ -699,7 +694,7 @@ extract_guid_from_registry_blob (guestfs_h *g, const void *blob) return safe_asprintf (g, "%08" PRIX32 "-%04" PRIX16 "-%04" PRIX16 "-%04" PRIX64 "-%06" PRIX64, - data1, data2, data3, (data4 >> 48), (data4 << 16)); + data1, data2, data3, data4 >> 48, data4 << 16); } /* NB: This function DOES NOT test for the existence of the file. It -- 2.5.0