Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at k12text.c:1997

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

K12Text__scan_buffer

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/k12text.c)expand/collapse
Show more  
 1991  YY_BUFFER_STATE K12Text__scan_buffer  (char * base, yy_size_t  size )
 1992  {
 1993          YY_BUFFER_STATE b;
 1994       
 1995          if ( size < 2 ||
 1996               base[size-2] != YY_END_OF_BUFFER_CHAR ||
 1997               base[size-1] != YY_END_OF_BUFFER_CHAR )
 1998                  /* They forgot to leave room for the EOB's. */
 1999                  return 0;
 2000   
 2001          b = (YY_BUFFER_STATE) K12Text_alloc(sizeof( struct yy_buffer_state )  );
 2002          if ( ! b )
 2003                  YY_FATAL_ERROR( "out of dynamic memory in K12Text__scan_buffer()" );
 2004   
 2005          b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
 2006          b->yy_buf_pos = b->yy_ch_buf = base;
 2007          b->yy_is_our_buffer = 0;
 2008          b->yy_input_file = 0;
 2009          b->yy_n_chars = b->yy_buf_size;
 2010          b->yy_is_interactive = 0;
 2011          b->yy_at_bol = 1;
 2012          b->yy_fill_buffer = 0;
 2013          b->yy_buffer_status = YY_BUFFER_NEW;
 2014   
 2015          K12Text__switch_to_buffer(b  );
 2016   
 2017          return b;
 2018  }
Show more  




Change Warning 1084.30281 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: