getopt() returns int

See getopt(3): returns int, so store it in an int variable.
I went through all occurrences, project-wide. All return values of
getopt() should be stored in ints now.
This commit is contained in:
Robert Schmidt
2024-10-24 19:22:06 +02:00
parent 2c07f0081e
commit cf9854601c
17 changed files with 18 additions and 20 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ int test_viterbi(uint8_t dabflag)
int main(int argc, char **argv)
{
char c;
int c;
uint8_t dabflag=0;
while ((c = getopt (argc, argv, "d")) != -1) {
+2 -1
View File
@@ -567,7 +567,7 @@ void help (void)
int main(int argc,char **argv)
{
char c,smbv_ip[16],smbv_fname[256];
char smbv_ip[16], smbv_fname[256];
extern char *optarg;
int i;
@@ -575,6 +575,7 @@ int main(int argc,char **argv)
strcpy(smbv_ip,DEFAULT_SMBV_IP);
strcpy(smbv_fname,DEFAULT_SMBV_FNAME);
int c;
while ((c = getopt (argc, argv, "hW:")) != -1) {
switch (c) {
case 'W':