- /* プログラム名、ラベル、アドレスを設定。メモリを確保できない場合はエラー発生 */
- if((np = malloc(sizeof(LABELTAB))) == NULL || (np->label = strdup(label)) == NULL ||
- (prog != NULL && (np->prog = strdup(prog)) == NULL))
- {
- setcerr(102, NULL); /* label table is full */
- return false;
+ /* メモリを確保 */
+ if((np = malloc(sizeof(LABELTAB))) == NULL) {
+ goto cerr102;
+ }
+ /* プログラム名を設定 */
+ if(prog == NULL) {
+ np->prog = NULL;
+ } else {
+ if((np->prog = strdup(prog)) == NULL) {
+ goto cerr102;
+ }
+ }
+ /* ラベルを設定 */
+ if((np->label = strdup(label)) == NULL) {
+ goto cerr102;