X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=cpmchmod.c;h=0ad1ce6f7af1b15dcf7b5e9bae36fd8e4a157646;hb=90e0f2eba429f24e3377d9625963fbc3325f0df1;hp=00c979fece0c65e3a0c529595957cbd2f93881da;hpb=975c05c916276c70d34b5aa14e5f0faca1ae013d;p=debian%2Fcpmtools diff --git a/cpmchmod.c b/cpmchmod.c index 00c979f..0ad1ce6 100644 --- a/cpmchmod.c +++ b/cpmchmod.c @@ -7,7 +7,7 @@ #include #include -#include "getopt.h" +#include "getopt_.h" #include "cpmfs.h" #ifdef USE_DMALLOC @@ -44,8 +44,8 @@ int main(int argc, char *argv[]) /*{{{*/ if (optind>=(argc-2)) usage=1; else { - image=argv[optind]; - if (!sscanf(argv[optind+1], "%o", &mode)) usage=1; + image=argv[optind++]; + if (!sscanf(argv[optind++], "%o", &mode)) usage=1; } if (usage)