Skip to content

Commit

Permalink
fix bug in cmdl_layer_init()
Browse files Browse the repository at this point in the history
  • Loading branch information
jfzheng committed Jan 25, 2016
1 parent e55641f commit 6620989
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libsim/sim_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ int ref_sval_2_idx(int nref, const opt_ref_t *refs, const char* val)

int ref_ival_2_idx(int nref, const opt_ref_t *refs, int val)
{
int i;
char s[256] = {0};

#ifdef WIN32
Expand Down Expand Up @@ -394,7 +393,7 @@ char* cmdl_iter_pop(cmdl_iter_t *iter, int b_opt)

cmdl_iter_t cmdl_layer_init(int layer)
{
cmdl_iter_t iter = { layer };
cmdl_iter_t iter = { 0, 0, 0, 0, layer };
return iter;
}

Expand Down Expand Up @@ -842,7 +841,7 @@ static
int cmdl_check(cmdl_iter_t *iter, void* dst, int optc, cmdl_opt_t optv[])
{
int n_err = 0;
int i_opt, i_arg;
int i_opt;
char *argv[2] = {0};

ENTER_FUNC();
Expand Down Expand Up @@ -935,7 +934,7 @@ int cmdl_help(cmdl_iter_t *iter, void* null, int optc, cmdl_opt_t optv[])
*/
int cmdl_result(cmdl_iter_t *iter, void* dst, int optc, cmdl_opt_t optv[])
{
int i_opt, i_arg;
int i_opt;

ENTER_FUNC();

Expand Down

0 comments on commit 6620989

Please sign in to comment.