Index: ossp-pkg/lmtp2nntp/lmtp2nntp_option.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_option.c,v rcsdiff -q -kk '-r1.28' '-r1.29' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_option.c,v' 2>/dev/null --- lmtp2nntp_option.c 2003/02/11 11:40:12 1.28 +++ lmtp2nntp_option.c 2003/02/11 12:54:58 1.29 @@ -378,10 +378,16 @@ case OPT_SINGLE: if (arg == NULL) return OPTION_ERR_ARG; - /* add this if repeated overwriting definitions of single values are not allowed - * if (oc->ndata >= 1 || oc->data.s != NULL) + /* add this if repeated overwriting definitions of single values is not allowed + * however, this will inhibit preinitialization with a default value + * if (oc->ndata != 0) * return OPTION_ERR_USE; */ + if (oc->ndata == 1 && oc->data.s != NULL) { /* free previous (default) assignment */ + free(oc->data.s); + oc->data.s = NULL; + oc->ndata = 0; + } if (cbctx != NULL) if (str_parse(arg, cbctx) <= 0) { fprintf(stderr, "ERROR: argument \"%s\" does NOT match syntax \"%s\"\n", arg, cbctx);