From 39e0011484d48b9e7c7b88c6efd4c61c6984d476 Mon Sep 17 00:00:00 2001
From: kushalsingh007 <kushal.spiderman.singh@gmail.com>
Date: Mon, 26 Jan 2015 11:35:53 +0530
Subject: [PATCH] * Making code more readable and removing extra parenthesis.
---
src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp b/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp
index e34a03b..22313cf 100644
a
|
b
|
status_t
|
106 | 106 | PartitionMapAddOn::ValidateInitialize(const BMutablePartition* partition, |
107 | 107 | BString* name, const char* parameters) |
108 | 108 | { |
109 | | if ((!CanInitialize(partition)) |
110 | | || (parameters == NULL) || (parameters[0] == '\0')) { |
| 109 | if (!CanInitialize(partition)) |
| 110 | return B_BAD_VALUE; |
| 111 | |
| 112 | if (parameters == NULL || parameters[0] == '\0') |
111 | 113 | return B_BAD_VALUE; |
112 | | } |
113 | 114 | |
114 | 115 | // we don't support a content name |
115 | 116 | if (name != NULL) |
… |
… |
status_t
|
123 | 124 | PartitionMapAddOn::Initialize(BMutablePartition* partition, const char* name, |
124 | 125 | const char* parameters, BPartitionHandle** _handle) |
125 | 126 | { |
126 | | if ((!CanInitialize(partition)) |
127 | | || (name == NULL) || (name[0] == '\0') |
128 | | || (parameters == NULL) || (parameters[0] == '\0')) { |
| 127 | if (!CanInitialize(partition)) |
129 | 128 | return B_BAD_VALUE; |
130 | | } |
131 | | |
| 129 | |
| 130 | if (name == NULL || name[0] == '\0') |
| 131 | return B_BAD_VALUE; |
| 132 | |
| 133 | if (parameters == NULL || parameters[0] == '\0') |
| 134 | return B_BAD_VALUE; |
| 135 | |
132 | 136 | // create the handle |
133 | 137 | PartitionMapHandle* handle = new(nothrow) PartitionMapHandle(partition); |
134 | 138 | if (!handle) |