src/stored/parse_bsr.c
static BSR *store_voladdr(LEX *lc, BSR *bsr)
{
   int token;
   BSR_VOLADDR *voladdr;

   for (;;) {
      token = lex_get_token(lc, T_PINT64_RANGE);
      if (token == T_ERROR) {
         return NULL;
      }
      voladdr = (BSR_VOLADDR *)malloc(sizeof(BSR_VOLADDR));
      memset(voladdr, 0, sizeof(BSR_VOLADDR));
      voladdr->saddr = lc->pint64_val;
      voladdr->eaddr = lc->pint64_val2;
      /* Add it to the end of the chain */
      if (!bsr->voladdr) {
         bsr->voladdr = voladdr;
      } else {
         /* Add to end of chain */
         BSR_VOLADDR *bs = bsr->voladdr;
         for ( ;bs->next; bs=bs->next)
            {  }
         bs->next = voladdr;
      }
      token = lex_get_token(lc, T_ALL);
      if (token != T_COMMA) {
         break;
      }
   }
   return bsr;
}
/*
 * Routine to handle Volume start/end address
 */
Routine to handle Volume start/end address
Routine to handle Volume start / end address
static BSR *store_voladdr(LEX *lc, BSR *bsr)
{
   int token;
   BSR_VOLADDR *voladdr;
   for (;;) {
      token = lex_get_token(lc, T_PINT64_RANGE);
      if (token == T_ERROR) {
         return NULL;
      }
      voladdr = (BSR_VOLADDR *)malloc(sizeof(BSR_VOLADDR));
      memset(voladdr, 0, sizeof(BSR_VOLADDR));
      voladdr->saddr = lc->pint64_val;
      voladdr->eaddr = lc->pint64_val2;
      if (!bsr->voladdr) {
         bsr->voladdr = voladdr;
      } else {
         BSR_VOLADDR *bs = bsr->voladdr;
         for ( ;bs->next; bs=bs->next)
            {  }
         bs->next = voladdr;
      }
      token = lex_get_token(lc, T_ALL);
      if (token != T_COMMA) {
         break;
      }
   }
   return bsr;
}
static BSR * store_voladdr ( LEX * lc , BSR * bsr ) { int token ; BSR_VOLADDR * voladdr ; for ( ; ; ) { token = lex_get_token ( lc , T_PINT64_RANGE ) ; if ( token == T_ERROR ) { return NULL ; } voladdr = ( BSR_VOLADDR * ) malloc ( sizeof ( BSR_VOLADDR ) ) ; memset ( voladdr , 0 , sizeof ( BSR_VOLADDR ) ) ; voladdr -> saddr = lc -> pint64_val ; voladdr -> eaddr = lc -> pint64_val2 ; if ( ! bsr -> voladdr ) { bsr -> voladdr = voladdr ; } else { BSR_VOLADDR * bs = bsr -> voladdr ; for ( ; bs -> next ; bs = bs -> next ) { } bs -> next = voladdr ; } token = lex_get_token ( lc , T_ALL ) ; if ( token != T_COMMA ) { break ; } } return bsr ; }
Routine to handle Volume start/end address
Routine to handle Volume start / end address
/* Add it to the end of the chain */ /* Add to end of chain */