Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/channels/pub_sub.cfa

    r50be8af rc26bea2a  
    8787          case 3:
    8888                if ( strcmp( argv[2], "d" ) != 0 ) {                    // default ?
    89                         Tasks = ato( argv[2] );
    90             if ( Tasks < 1 ) fallthru default;
     89                        Tasks = atoi( argv[2] );
     90            if ( Tasks < 1 ) goto Usage;
    9191                } // if
    9292          case 2:
    9393                if ( strcmp( argv[1], "d" ) != 0 ) {                    // default ?
    94                         Processors = ato( argv[1] );
    95                         if ( Processors < 1 ) fallthru default;
     94                        Processors = atoi( argv[1] );
     95                        if ( Processors < 1 ) goto Usage;
    9696                } // if
    9797          case 1:                                                                                       // use defaults
    9898                break;
    9999          default:
    100                 exit | "Usage: " | argv[0]
     100          Usage:
     101                sout | "Usage: " | argv[0]
    101102             | " [ processors (> 0) | 'd' (default " | Processors
    102103                         | ") ] [ Tasks (> 0) | 'd' (default " | Tasks
    103104                         | ") ]" ;
     105                exit( EXIT_FAILURE );
    104106        } // switch
    105107    BarrierSize = Tasks;
Note: See TracChangeset for help on using the changeset viewer.