]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix uninitialized variables
authorKern Sibbald <kern@sibbald.com>
Mon, 19 Aug 2002 07:52:19 +0000 (07:52 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 19 Aug 2002 07:52:19 +0000 (07:52 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@102 91ce42f0-d328-0410-95d8-f526ca767f89

22 files changed:
bacula/autoconf/configure.in
bacula/configure
bacula/kernstodo
bacula/src/console/console_conf.c
bacula/src/dird/dird_conf.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/run_conf.c
bacula/src/dird/ua_output.c
bacula/src/dird/ua_restore.c
bacula/src/dird/ua_status.c
bacula/src/dird/verify.c
bacula/src/filed/filed_conf.c
bacula/src/lib/lex.c
bacula/src/lib/parse_conf.c
bacula/src/lib/tree.c
bacula/src/lib/util.c
bacula/src/stored/askdir.c
bacula/src/stored/bextract.c
bacula/src/stored/dev.c
bacula/src/stored/device.c
bacula/src/stored/dircmd.c
bacula/src/stored/stored_conf.c

index 00d71c2bfe9ca99062651e7772a83c5ce6ba85c2..77dab536cfc2ba4f495ca2f6719422c2cfdf4923 100644 (file)
@@ -646,7 +646,7 @@ dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
 dnl#
 if test -z "$CFLAGS"; then
     if test -z "$CCOPTS"; then
-       CCOPTS='-O'
+       CCOPTS='-g -O2'
 dnl>   if test "x$GCC" = xyes; then
 dnl>       if test x$system = xLinux; then
 dnl>           CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
index 3728d59fd0495e1cf3660070c37343de996f455a..eafb9befd7c8158a1e50a9f05bfe2b42671a77e2 100755 (executable)
@@ -4028,7 +4028,7 @@ EOF
 
 if test -z "$CFLAGS"; then
     if test -z "$CCOPTS"; then
-       CCOPTS='-O'
+       CCOPTS='-g -O2'
     fi
     CFLAGS="$CCOPTS"
 fi
index 0ecff1b5bc3b513e5e310236df472dd62391c9f6..24c3fd6a0722e488f66bced6f22b212af90ab824 100644 (file)
@@ -28,6 +28,8 @@ From Chuck:
 --sd.conf password does not match dir.conf storage password
 =======
 
+- Add new code to scheduler.c and run_conf.c
+- Problem with len at 362 in tree.c
 - Volume Bytes shows bytes on last volume written in Job summary.
 - Fix catalog filename truncation in sql_get and sql_create. Use
   only a single filename split routine.
index f0d30810f1747d0b26978abed510c25355cd00fc..f8a79503c01119b043a40be94d6c66a03e5ae78a 100644 (file)
@@ -182,7 +182,7 @@ void save_resource(int type, struct res_items *items, int pass)
 {
    URES *res;
    int rindex = type - r_first;
-   int i, size;
+   int i, size;    
    int error = 0;
 
    /* 
@@ -239,6 +239,7 @@ void save_resource(int type, struct res_items *items, int pass)
       default:
          printf("Unknown resource type %d\n", type);
         error = 1;
+        size = 1;
         break;
    }
    /* Common */
index d479797d9f103f576573596beb658285b277f5e4..dd00ff9c18a58ef50bd8872096e1145d84eae268 100644 (file)
@@ -892,6 +892,7 @@ void save_resource(int type, struct res_items *items, int pass)
       default:
          printf("Unknown resource type %d\n", type);
         error = 1;
+        size = 1;
         break;
    }
    /* Common */
index fb5f8a953efe3254f201c28ee3792dd2d4d369c3..d018ac3dbeb2f72ae5d4690854782b11e160661d 100644 (file)
@@ -183,7 +183,7 @@ int send_exclude_list(JCR *jcr)
 int get_attributes_and_put_in_catalog(JCR *jcr)
 {
    BSOCK   *fd;
-   int n;
+   int n = 0;
    ATTR_DBR ar;
 
    fd = jcr->file_bsock;
index b9e307bad332253d086d3884d6ec38c1db48ce67..3efb8f24b6736b132e5087a37f29722a51ca42c4 100644 (file)
@@ -168,7 +168,7 @@ static struct s_kw RunFields[] = {
 void store_run(LEX *lc, struct res_items *item, int index, int pass)
 {
    int i, j, found;
-   int token, state, state2, code, code2;
+   int token, state, state2 = 0, code = 0, code2 = 0;
    int options = lc->options;
    RUN **run = (RUN **)(item->value);  
    RUN *trun;
@@ -190,6 +190,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            found = TRUE;
            if (lex_get_token(lc, T_ALL) != T_EQUALS) {
                scan_err1(lc, "Expected an equals, got: %s", lc->str);
+              /* NOT REACHED */ 
            }
            token = lex_get_token(lc, T_NAME);
            switch (RunFields[i].token) {
@@ -204,6 +205,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
               }
               if (j != 0) {
                   scan_err1(lc, _("Job level field: %s not found in run record"), lc->str);
+                 /* NOT REACHED */
               }
               break;
             case 'P':                 /* Pool */
@@ -212,6 +214,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
                  if (res == NULL) {
                      scan_err1(lc, "Could not find specified Pool Resource: %s",
                                lc->str);
+                    /* NOT REACHED */
                  }
                  lrun.pool = (POOL *)res;
               }
@@ -222,6 +225,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
                  if (res == NULL) {
                      scan_err1(lc, "Could not find specified Storage Resource: %s",
                                lc->str);
+                    /* NOT REACHED */
                  }
                  lrun.storage = (STORE *)res;
               }
@@ -232,12 +236,14 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
                  if (res == NULL) {
                      scan_err1(lc, "Could not find specified Messages Resource: %s",
                                lc->str);
+                    /* NOT REACHED */
                  }
                  lrun.msgs = (MSGS *)res;
               }
               break;
            default:
                scan_err1(lc, "Expected a keyword name, got: %s", lc->str);
+              /* NOT REACHED */
               break;
            } /* end switch */     
         } /* end if strcasecmp */
@@ -265,7 +271,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
    set_defaults();
 
    for ( ; token != T_EOL; (token = lex_get_token(lc, T_ALL))) {
-      int len, pm;
+      int len, pm = 0;
       switch (token) {
         case T_NUMBER:
            state = s_mday;
@@ -295,12 +301,14 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            }
            if (i != 0) {
                scan_err1(lc, _("Job type field: %s in run record not found"), lc->str);
+              /* NOT REACHED */
            }
            break;
         case T_COMMA:
            continue;
         default:
             scan_err2(lc, _("Unexpected token: %d:%s"), token, lc->str);
+           /* NOT REACHED */
            break;
       }
       switch (state) {
@@ -332,6 +340,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
         case s_time:                 /* time */
            if (!have_at) {
                scan_err0(lc, _("Time must be preceded by keyword AT."));
+              /* NOT REACHED */
            }
            if (!have_hour) {
               clear_bit(0, lrun.hour);
@@ -339,6 +348,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
             p = strchr(lc->str, ':');
            if (!p)  {
                scan_err0(lc, _("Time logic error.\n"));
+              /* NOT REACHED */
            }
            *p++ = 0;                 /* separate two halves */
            code = atoi(lc->str);
@@ -350,6 +360,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
                  pm = 1;
               } else {
                   scan_err0(lc, _("Bad time specification."));
+                 /* NOT REACHED */
               }
            } else {
               pm = 0;
@@ -360,6 +371,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            }
            if (code < 0 || code > 23 || code2 < 0 || code2 > 59) {
                scan_err0(lc, _("Bad time specification."));
+              /* NOT REACHED */
            }
            set_bit(code, lrun.hour);
            lrun.minute = code2;
@@ -408,6 +420,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            }
            if (i != 0 || (state != s_month && state != s_wday)) {
                scan_err0(lc, _("Invalid month or week day range"));
+              /* NOT REACHED */
            }
 
            /* Lookup end of range */
@@ -423,6 +436,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            if (i != 0 || state != state2 || 
               (state2 != s_month && state2 != s_wday) || code == code2) {
                scan_err0(lc, _("Invalid month or weekday range"));
+              /* NOT REACHED */
            }
            if (state == s_wday) {
               if (!have_wday) {
@@ -473,6 +487,7 @@ void store_run(LEX *lc, struct res_items *item, int index, int pass)
            break;
         default:
             scan_err0(lc, _("Unexpected run state\n"));
+           /* NOT REACHED */
            break;
       }
    }
index 9f887cbebea781bd37b573b3701784bef76cbfd2..91dc6deff1eef91eb4279bee0a69a8c64d64ef53 100644 (file)
@@ -105,7 +105,7 @@ int showcmd(UAContext *ua, char *cmd)
    int i, j, type, len; 
    int recurse;
    char *res_name;
-   RES *res;
+   RES *res = NULL;
 
    Dmsg1(20, "show: %s\n", ua->UA_sock->msg);
 
index cb4dc69b20bc759a236409cd09d6182929c071b3..4f5922b37a1413b3e61059c9a9daadbdc6727ee5 100644 (file)
@@ -554,6 +554,7 @@ static void user_select_files(TREE_CTX *tree)
 
       len = strlen(tree->ua->argk[0]);
       found = 0;
+      stat = 0;
       for (i=0; i<(int)comsize; i++)      /* search for command */
         if (strncasecmp(tree->ua->argk[0],  _(commands[i].key), len) == 0) {
            stat = (*commands[i].func)(tree->ua, tree);   /* go execute command */
index 89e542a7181ed3a66c7f5320e6d016270a753937..65a826db10551ef8e56e9d5cd3dbf94b2af36224 100644 (file)
@@ -428,7 +428,7 @@ static void print_jobs_scheduled(UAContext *ua)
            }
         }
 
-        Dmsg2(200, "runtime=%d now=%d\n", runtime, now);
+//      Dmsg2(200, "runtime=%d now=%d\n", runtime, now);
        if (!found && tom) {
            localtime_r(&tomorrow, &tm);
            hour = 0;
index 04642bfa91e9f800126d36b64baec6a05e4620d9..699f99ce44cb896496c93d9aca2d22459873376f 100644 (file)
@@ -72,7 +72,7 @@ int do_verify(JCR *jcr)
    char *level;
    BSOCK   *fd;
    JOB_DBR jr;
-   JobId_t JobId;
+   JobId_t JobId = 0;
 
    if (!get_or_create_client_record(jcr)) {
       goto bail_out;
@@ -392,7 +392,7 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
     *  Link name  ???
     */
    while ((n=bget_msg(fd, 0)) > 0 && !job_cancelled(jcr)) {
-      long file_index, attr_file_index;
+      long file_index = 0, attr_file_index = 0;
       int stream;
       char *attr, *p, *fn;
       char Opts_MD5[MAXSTRING];        /* Verify Opts or MD5 signature */
index 1c9c2da75990a658a03752f7d40159357fedaab5..6d2fcd2d9d0d4ab4aa4945396484659d621eaa5b 100644 (file)
@@ -280,6 +280,7 @@ void save_resource(int type, struct res_items *items, int pass)
       default:
          printf(_("Unknown resource type %d\n"), type);
         error = 1;
+        size = 1;
         break;
    }
    /* Common */
index c98766d310b9feb1502dc82b669dbb6eb346c858..8f775490138199fb69d7d2305a9cb41872604242 100644 (file)
@@ -247,14 +247,16 @@ lex_tok_to_str(int token)
 
 static uint32_t scan_pint(LEX *lf, char *str)
 {
-   double dval;
+   double dval = 0;
    if (!is_a_number(str)) {
       scan_err1(lf, "expected a positive integer number, got: %s", str);
+      /* NOT REACHED */
    } else {
       errno = 0;
       dval = strtod(str, NULL);
       if (errno != 0 || dval < 0) {
          scan_err1(lf, "expected a postive integer number, got: %s", str);
+        /* NOT REACHED */
       }
    }
    return (uint32_t)dval;
index 3b1e6d82a1692c220b6079697f3b7247235f5fc7..99c1598e74584326857dad9edc58fd54fd74d2e0 100755 (executable)
@@ -184,7 +184,7 @@ void store_msgs(LEX *lc, struct res_items *item, int index, int pass)
    int token;
    char *cmd;
    POOLMEM *dest;
-   int dest_len;
+   int dest_len;    
 
    Dmsg2(200, "store_msgs pass=%d code=%d\n", pass, item->code);
    if (pass == 1) {
@@ -205,12 +205,12 @@ void store_msgs(LEX *lc, struct res_items *item, int index, int pass)
               cmd = res_all.res_msgs.mail_cmd;
            }
            dest = get_pool_memory(PM_MESSAGE);
-           dest_len = 0;
            dest[0] = 0;
+           dest_len = 0;
            /* Pick up comma separated list of destinations */
            for ( ;; ) {
               token = lex_get_token(lc, T_NAME);   /* scan destination */
-              dest = (char *) check_pool_memory_size(dest, dest_len + lc->str_len + 2);
+              dest = check_pool_memory_size(dest, dest_len + lc->str_len + 2);
               if (dest[0] != 0) {
                   strcat(dest, " ");  /* separate multiple destinations with space */
                  dest_len++;
@@ -237,7 +237,7 @@ void store_msgs(LEX *lc, struct res_items *item, int index, int pass)
            dest = get_pool_memory(PM_MESSAGE);
            /* Pick up a single destination */
            token = lex_get_token(lc, T_NAME);   /* scan destination */
-           dest = check_pool_memory_size(dest, dest_len + lc->str_len + 2);
+           dest = check_pool_memory_size(dest, lc->str_len + 2);
            strcpy(dest, lc->str);
            dest_len = lc->str_len;
            token = lex_get_token(lc, T_ALL);
@@ -269,7 +269,7 @@ void store_msgs(LEX *lc, struct res_items *item, int index, int pass)
 static void scan_types(LEX *lc, MSGS *msg, int dest_code, char *where, char *cmd)
 {
    int i, found, quit, is_not;
-   int msg_type;
+   int msg_type = 0;
    char *str;
 
    for (quit=0; !quit;) {
@@ -291,6 +291,7 @@ static void scan_types(LEX *lc, MSGS *msg, int dest_code, char *where, char *cmd
       }
       if (!found) {
          scan_err1(lc, "message type: %s not found", str);
+        /* NOT REACHED */
       }
 
       if (msg_type == M_MAX+1) {        /* all? */
@@ -640,9 +641,10 @@ void
 parse_config(char *cf)
 {
    LEX *lc = NULL;
-   int token, i, res_type, pass;
+   int token, i, pass;
+   int res_type = 0;
    enum parse_state state = p_none;
-   struct res_items *items;
+   struct res_items *items = NULL;
    int level = 0;
 
    /* Make two passes. The first builds the name symbol table,
@@ -661,6 +663,7 @@ parse_config(char *cf)
               }
               if (token != T_IDENTIFIER) {
                   scan_err1(lc, "Expected a Resource name identifier, got: %s", lc->str);
+                 /* NOT REACHED */
               }
               for (i=0; resources[i].name; i++)
                  if (strcasecmp(resources[i].name, lc->str) == 0) {
@@ -672,6 +675,7 @@ parse_config(char *cf)
                  }
               if (state == p_none) {
                   scan_err1(lc, "expected resource name, got: %s", lc->str);
+                 /* NOT REACHED */
               }
               break;
            case p_resource:
@@ -682,6 +686,7 @@ parse_config(char *cf)
                  case T_IDENTIFIER:
                     if (level != 1) {
                         scan_err1(lc, "not in resource definition: %s", lc->str);
+                       /* NOT REACHED */
                     }
                     for (i=0; items[i].name; i++) {
                        if (strcasecmp(items[i].name, lc->str) == 0) {
@@ -689,6 +694,7 @@ parse_config(char *cf)
                            Dmsg1 (150, "in T_IDENT got token=%s\n", lex_tok_to_str(token));
                           if (token != T_EQUALS) {
                               scan_err1(lc, "expected an equals, got: %s", lc->str);
+                             /* NOT REACHED */
                           }
                            Dmsg1(150, "calling handler for %s\n", items[i].name);
                           /* Call item handler */
@@ -701,6 +707,7 @@ parse_config(char *cf)
                         Dmsg2(150, "level=%d id=%s\n", level, lc->str);
                         Dmsg1(150, "Keyword = %s\n", lc->str);
                         scan_err1(lc, "Keyword %s not permitted in this resource", lc->str);
+                       /* NOT REACHED */
                     }
                     break;
 
@@ -717,10 +724,12 @@ parse_config(char *cf)
                  default:
                      scan_err2(lc, "unexpected token %d %s in resource definition",    
                        token, lex_tok_to_str(token));
+                    /* NOT REACHED */
               }
               break;
            default:
                scan_err1(lc, "Unknown parser state %d\n", state);
+              /* NOT REACHED */
         }
       }
       if (debug_level > 50 && pass == 2) {
index daeba72ba98af938ebdcbcb9dd7e90e8a163739e..59e1c60091cbf12e8455faa05e6ab8457c84859c 100755 (executable)
@@ -356,6 +356,9 @@ TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node)
 }
 
 
+/*
+ * Do a relative cwd -- i.e. relative to current node rather than root node
+ */
 TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node)
 {
    char *p;
@@ -365,9 +368,12 @@ TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node)
    if (*path == 0) {
       return node;
    }
+   /* Check the current segment only */
    p = strchr(path, '/');
    if (p) {
       len = p - path;
+   } else {
+      len = strlen(path);
    }
    for (cd=node->child; cd; cd=cd->sibling) {
       if (strncmp(cd->fname, path, len) == 0) {
@@ -383,6 +389,7 @@ TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node)
       return cd;
    }
    Dmsg2(100, "recurse tree_relcwd with path=%s, cd=%s\n", p+1, cd->fname);
+   /* Check the next segment if any */
    return tree_relcwd(p+1, root, cd);
 }
 
index 405d32e57c7d3c2ea8a60c2a063e2c5f1b13cc09..587697fe7cdc918faed66b44c89645a7940badad 100644 (file)
@@ -312,7 +312,7 @@ fstrsch(char *a, char *b)   /* folded case search */
 char *encode_time(time_t time, char *buf)
 {
    struct tm tm;
-   int n;
+   int n = 0;
 
    if (localtime_r(&time, &tm)) {
       n = sprintf(buf, "%04d-%02d-%02d %02d:%02d:%02d",
@@ -666,7 +666,7 @@ int run_program(char *prog, int wait, POOLMEM *results)
 {
    int stat = ETIME;
    int chldstatus = 0;
-   pid_t pid1, pid2;
+   pid_t pid1, pid2 = 0;
    int pfd[2];
    char *bargv[MAX_ARGV];
    int bargc;
index 48517d3ea5eb9433b96ba009ebe46e97e8f7811e..4e49b90e71cb7b89e6b05004b9d779d478d4608d 100644 (file)
@@ -245,7 +245,7 @@ int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev)
    struct timeval tv;
    struct timezone tz;
    struct timespec timeout;
-   int stat, jstat;
+   int stat = 0, jstat;
    /* ******FIXME******* put these on config variable */
    int min_wait = 60 * 60;
    int max_wait = 24 * 60 * 60;
@@ -386,7 +386,7 @@ volumes for Job=%s.\n"), jcr->Job);
  */
 int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
 {
-   int stat, jstat;
+   int stat = 0;
    /* ******FIXME******* put these on config variable */
    int min_wait = 60 * 60;
    int max_wait = 24 * 60 * 60;
@@ -428,7 +428,7 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
       P(dev->mutex);
       dev_blocked = dev->dev_blocked;
       dev->dev_blocked = BST_WAITING_FOR_SYSOP; /* indicate waiting for mount */
-      jcr->JobStatus = jstat;
+      jcr->JobStatus = JS_WaitMount;
       dir_send_job_status(jcr);
 
       for ( ;!job_cancelled(jcr); ) {
index 3ea5449d26c2cf57b57cba5285c3c2e41b25b773..886713392af997f37b7b063c1f5afeb8726f77d8 100644 (file)
@@ -155,7 +155,6 @@ int main (int argc, char *argv[])
 
 static void do_extract(char *devname, char *where)
 {
-   int n;     
    char VolName[100];
    char *p;
    struct stat statp;
@@ -284,7 +283,8 @@ static void do_extract(char *devname, char *where)
         else if (!(status & MT_ONLINE))
             Emsg0(M_ERROR_TERM, 0, "Unexpected Tape is Off-line\n");
         else
-            Emsg3(M_ERROR_TERM, 0, "Read error %d on Record Header %s: %s\n", n, dev_name(dev), strerror(errno));
+            Emsg3(M_ERROR_TERM, 0, "Read error %d on Record Header %s: %s\n", 
+              status, dev_name(dev), strerror(errno));
       }
 
 
index b50fb455bd4ce5f5fa6e60e1b931f5fdf0894ef8..e9e3425d28c4001f8d80749e313e60618acf3c06 100644 (file)
@@ -609,7 +609,7 @@ int
 fsf_dev(DEVICE *dev, int num)
 { 
    struct mtop mt_com;
-   int stat;
+   int stat = 0;
    char rbuf[1024];
 
    if (dev->fd < 0) {
index 1bee572b4c93039b7e80a858a5f7ebee94c6d60c..7f20bef970651c352b6709d9f085ef961cbae76f 100644 (file)
@@ -612,7 +612,7 @@ int fixup_device_block_write_error(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
 {
    uint32_t stat = 0;                  
    char PrevVolName[MAX_NAME_LENGTH];
-   DEV_BLOCK *label_blk;
+   DEV_BLOCK *label_blk = NULL;
    char b1[30], b2[30];
    time_t wait_time;
 
@@ -698,7 +698,9 @@ int fixup_device_block_write_error(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
       jcr->run_time += time(NULL) - wait_time; /* correct run time */
       return 1;                               /* device locked */
    }
-   free_block(label_blk);
+   if (label_blk) {
+      free_block(label_blk);
+   }
    return 0;                         /* device locked */
 }
 
index 1f5b4c8c5b21a7bcb01c066bf784539993d503a1..26bd3cbffa113e2f351b9bd2e8ff7700bde16e71 100644 (file)
@@ -104,7 +104,7 @@ void connection_request(void *arg)
    BSOCK *bs = (BSOCK *)arg;
    JCR *jcr;
    int i, found, quit;
-   int bnet_stat;
+   int bnet_stat = 0;
    char name[MAX_NAME_LENGTH];
 
    if (bnet_recv(bs) <= 0) {
index 36a54278a9a4602e46a07bd0fd0bb816b6271a30..c42bf4c392a47b52c5ba6ba32f98627fcf813bad 100644 (file)
@@ -369,6 +369,7 @@ void save_resource(int type, struct res_items *items, int pass)
       default:
          printf("Unknown resource type %d\n", type);
         error = 1;
+        size = 1;
         break;
    }
    /* Common */