Changeset 948222e4 in mainline for uspace/app/bdsh


Ignore:
Timestamp:
2018-03-14T12:04:14Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
963037b0
Parents:
5b61171
git-author:
Jiri Svoboda <jiri@…> (2018-03-13 17:02:57)
git-committer:
Jiri Svoboda <jiri@…> (2018-03-14 12:04:14)
Message:

A few more cases of for loops without iteration expression (which isn't really a for loop).

Location:
uspace/app/bdsh/cmds/modules
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    r5b61171 r948222e4  
    338338        argc = cli_count_args(argv);
    339339
    340         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     340        c = 0;
     341        optreset = 1;
     342        optind = 0;
     343        opt_ind = 0;
     344
     345        while (c != -1) {
    341346                c = getopt_long(argc, argv, "xhvmH:t:b:sn", long_options, &opt_ind);
    342347                switch (c) {
  • uspace/app/bdsh/cmds/modules/cmp/cmp.c

    r5b61171 r948222e4  
    123123        argc = cli_count_args(argv);
    124124
    125         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     125        c = 0;
     126        optreset = 1;
     127        optind = 0;
     128        opt_ind = 0;
     129
     130        while (c != -1) {
    126131                c = getopt_long(argc, argv, "hv", long_options, &opt_ind);
    127132                switch (c) {
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    r5b61171 r948222e4  
    484484        argc = cli_count_args(argv);
    485485
    486         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     486        c = 0;
     487        optreset = 1;
     488        optind = 0;
     489        opt_ind = 0;
     490
     491        while (c != -1) {
    487492                c = getopt_long(argc, argv, "hvVfirb:", long_options, &opt_ind);
    488493                switch (c) {
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    r5b61171 r948222e4  
    356356        argc = cli_count_args(argv);
    357357
    358         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     358        c = 0;
     359        optreset = 1;
     360        optind = 0;
     361        opt_ind = 0;
     362
     363        while (c != -1) {
    359364                c = getopt_long(argc, argv, "hur", long_options, &opt_ind);
    360365                switch (c) {
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    r5b61171 r948222e4  
    168168        argc = cli_count_args(argv);
    169169
    170         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     170        c = 0;
     171        optreset = 1;
     172        optind = 0;
     173        opt_ind = 0;
     174
     175        while (c != -1) {
    171176                c = getopt_long(argc, argv, "pvhVfm:", long_options, &opt_ind);
    172177                switch (c) {
  • uspace/app/bdsh/cmds/modules/mkfile/mkfile.c

    r5b61171 r948222e4  
    133133        argc = cli_count_args(argv);
    134134
    135         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     135        c = 0;
     136        optreset = 1;
     137        optind = 0;
     138        opt_ind = 0;
     139
     140        while (c != -1) {
    136141                c = getopt_long(argc, argv, "ps:h", long_options, &opt_ind);
    137142                switch (c) {
  • uspace/app/bdsh/cmds/modules/mount/mount.c

    r5b61171 r948222e4  
    141141        argc = cli_count_args(argv);
    142142
    143         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     143        c = 0;
     144        optreset = 1;
     145        optind = 0;
     146        opt_ind = 0;
     147
     148        while (c != -1) {
    144149                c = getopt_long(argc, argv, "i:ht", long_options, &opt_ind);
    145150                switch (c) {
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    r5b61171 r948222e4  
    260260        }
    261261
    262         for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
     262        c = 0;
     263        optreset = 1;
     264        optind = 0;
     265        opt_ind = 0;
     266
     267        while (c != -1) {
    263268                c = getopt_long(argc, argv, "hvrfs", long_options, &opt_ind);
    264269                switch (c) {
  • uspace/app/bdsh/cmds/modules/touch/touch.c

    r5b61171 r948222e4  
    8888        DIR *dirp;
    8989
    90         for (c = 0, optreset = 1, optind = 0, longind = 0; c != -1; ) {
     90        c = 0;
     91        optreset = 1;
     92        optind = 0;
     93        longind = 0;
     94
     95        while (c != -1) {
    9196                c = getopt_long(argc, argv, "c", long_options, &longind);
    9297                switch (c) {
Note: See TracChangeset for help on using the changeset viewer.