<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 2014年08月12日 10:33, Ruoyu wrote:<br>
</div>
<blockquote cite="mid:53E97CF0.5030907@ucweb.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi gluster developers,<br>
<br>
In the file cli/src/cli-rpc-ops.c, at line 4611, duplicated
branches for if and else is found. Is it a typo?<br>
<br>
4607 case GF_GSYNC_OPTION_TYPE_STATUS:<br>
4608 status_detail = dict_get_str_boolean
(dict,<br>
4609
"status-detail",<br>
4610
_gf_false);<br>
4611 if (status_detail)<br>
4612 ret =
gf_cli_gsync_status_output (dict, status_detail);<br>
4613 else<br>
4614 ret =
gf_cli_gsync_status_output (dict, status_detail);<br>
4615 break;<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</blockquote>
Another case, in the file
xlators/features/snapview-server/src/snapview-server.c, line 268.
Both of the two branches are same.<br>
<br>
268 if ((priv->num_snaps == 0) &&<br>
269 (snapcount != 0)) {<br>
270 /* first time we are fetching snap list */<br>
271 dirents = GF_CALLOC (snapcount, sizeof
(snap_dirent_t),<br>
272 gf_svs_mt_dirents_t);<br>
273 if (!dirents) {<br>
274 gf_log (frame->this->name,
GF_LOG_ERROR,<br>
275 "Unable to allocate memory");<br>
276 errno = ENOMEM;<br>
277 ret = -1;<br>
278 goto unlock;<br>
279 }<br>
280 } else {<br>
281 /* fetch snaplist dynamically at run-time */<br>
282 dirents = GF_CALLOC (snapcount, sizeof
(snap_dirent_t),<br>
283 gf_svs_mt_dirents_t);<br>
284 if (!dirents) {<br>
285 gf_log (frame->this->name,
GF_LOG_ERROR,<br>
286 "Unable to allocate memory");<br>
287 errno = ENOMEM;<br>
288 ret = -1;<br>
289 goto unlock;<br>
290 }<br>
291 }<br>
<br>
</body>
</html>