if (step_cnt != 0)
if (failed != 0)
gen_steps (struct derivation_step *best, const char *toset,	   const char *fromset, struct gconv_step **handle, size_t *nsteps){  size_t step_cnt = 0;  struct gconv_step *result;  struct derivation_step *current;  int status = GCONV_NOMEM;  /* First determine number of steps.  */  for (current = best; current->last != NULL; current = current->last)    ++step_cnt;  result = (struct gconv_step *) malloc (sizeof (struct gconv_step)					 * step_cnt);  if (result != NULL)    {      current = best;      while (step_cnt-- > 0)	{	  result[step_cnt].from_name = current->last->result_set;	  result[step_cnt].to_name = current->result_set;	  if (current->code->module_name[0] == '/')	    {	      /* Load the module, return handle for it.  */	      void *shlib_handle =		__gconv_find_shlib (current->code->module_name);	      if (shlib_handle == NULL)		break;	      result[step_cnt].shlib_handle = shlib_handle;	      result[step_cnt].fct = __gconv_find_func (shlib_handle, "gconv");	      if (result[step_cnt].fct == NULL)		{		  /* Argh, no conversion function.  There is something		     wrong here.  */		  __gconv_release_shlib (result[step_cnt].shlib_handle);		  break;		}	      result[step_cnt].init_fct = __gconv_find_func (shlib_handle,							     "gconv_init");	      result[step_cnt].end_fct = __gconv_find_func (shlib_handle,							    "gconv_end");	    }	  else	    /* It's a builtin transformation.  */	    __gconv_get_builtin_trans (current->code->module_name,				       &result[step_cnt]);	  current = current->last;	}      if (step_cnt != 0)	{	  /* Something went wrong while initializing the modules.  */	  while (step_cnt-- > 0)	    __gconv_release_shlib (result[step_cnt].shlib_handle);	  free (result);	  status = GCONV_NOCONV;	}      else	{	  *handle = result;	  *nsteps = step_cnt;	  status = GCONV_OK;	}    }  return status;}