@@ -131,7 +131,6 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
131131 }
132132 }
133133
134- {
135134 /* Clear old value */
136135 const UriBool hadHostBefore = URI_FUNC (HasHost )(uri );
137136 if (uri -> hostData .ipFuture .first != NULL ) {
@@ -169,16 +168,13 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
169168 if (hadHostBefore == URI_TRUE ) {
170169 uri -> absolutePath = URI_TRUE ;
171170
172- {
173171 const UriBool success =
174172 URI_FUNC (EnsureThatPathIsNotMistakenForHost )(uri , memory );
175173 return (success == URI_TRUE ) ? URI_SUCCESS : URI_ERROR_MALLOC ;
176- }
177174 }
178175
179176 return URI_SUCCESS ;
180177 }
181- }
182178
183179 assert (first != NULL );
184180
@@ -193,7 +189,6 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
193189 assert (uri -> owner == URI_TRUE );
194190
195191 /* Apply new value; NOTE that .hostText is set for all four host types */
196- {
197192 URI_TYPE (TextRange ) sourceRange ;
198193 sourceRange .first = first ;
199194 sourceRange .afterLast = afterLast ;
@@ -213,7 +208,6 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
213208 return URI_ERROR_MALLOC ;
214209 }
215210
216- {
217211 const int res = URI_FUNC (ParseIpFourAddress )(uri -> hostData .ip4 -> data ,
218212 first , afterLast );
219213# if defined(NDEBUG )
@@ -222,15 +216,13 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
222216 assert (res
223217 == URI_SUCCESS ); /* because checked for well-formedness earlier */
224218# endif
225- }
226219 } break ;
227220 case URI_HOST_TYPE_IP6 : {
228221 uri -> hostData .ip6 = memory -> malloc (memory , sizeof (UriIp6 ));
229222 if (uri -> hostData .ip6 == NULL ) {
230223 return URI_ERROR_MALLOC ;
231224 }
232225
233- {
234226 const int res = URI_FUNC (ParseIpSixAddressMm )(uri -> hostData .ip6 , first ,
235227 afterLast , memory );
236228 assert ((res == URI_SUCCESS )
@@ -239,7 +231,6 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
239231 if (res != URI_SUCCESS ) {
240232 return res ;
241233 }
242- }
243234 } break ;
244235 case URI_HOST_TYPE_IPFUTURE :
245236 uri -> hostData .ipFuture .first = uri -> hostText .first ;
@@ -250,7 +241,6 @@ int URI_FUNC(InternalSetHostMm)(URI_TYPE(Uri) * uri, UriHostType hostType,
250241 default :
251242 assert (0 && "Unsupported URI host type" );
252243 }
253- }
254244
255245 return URI_SUCCESS ;
256246}
0 commit comments