Fixed build on 64bit systems (type mismatch in comparison)

master
Alexey Khromov 2 months ago
parent ad1776c805
commit 634fc3e3e5

@ -257,7 +257,7 @@ int main(int argc, char *argv[], char *envp[])
// parsing // parsing
while( (ch=getopt(argc, argv, "hfI:p:n:l:a:u:oiC:S:dq")) != EOF ) while( (ch=getopt(argc, argv, "hfI:p:n:l:a:u:oiC:S:dq")) != (int)-1 )
{ {
switch( ch ) { switch( ch ) {
case 'h': case 'h':

@ -193,7 +193,7 @@ int main(int argc, char *argv[])
(void)setlocale(LC_ALL, ""); (void)setlocale(LC_ALL, "");
/* Set our name (for logging only) */ /* Set our name (for logging only) */
while( (c = getopt(argc, argv, "hf")) != EOF ) while( (c = getopt(argc, argv, "hf")) != (char)-1 )
{ {
switch( c ) { switch( c ) {
case 'f': case 'f':
@ -204,8 +204,9 @@ int main(int argc, char *argv[])
exit(0); exit(0);
default: default:
usage(); usage();
exit(1); exit(5);
} }
} }
if( conf_readconf(conf_getconfname(), 0) ) if( conf_readconf(conf_getconfname(), 0) )
@ -216,7 +217,7 @@ int main(int argc, char *argv[])
if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) ) if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
{ {
log("can't continue without logging"); log("can't continue without logging");
exit(1); exit(2);
} }
/* Ignore some terminating signals */ /* Ignore some terminating signals */

@ -253,7 +253,7 @@ int main(int argc, char *argv[])
bfstat_opts_default(&opts); bfstat_opts_default(&opts);
while( (c = getopt(argc, argv, "acfhn:prst")) != EOF ) while( (c = getopt(argc, argv, "acfhn:prst")) != (char)-1 )
{ {
switch( c ) { switch( c ) {
case 'h': case 'h':

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
/* Initialise current locale */ /* Initialise current locale */
(void)setlocale(LC_ALL, ""); (void)setlocale(LC_ALL, "");
while( (ch=getopt(argc, argv, "hrm")) != EOF ) while( (ch=getopt(argc, argv, "hrm")) != (char)-1 )
{ {
switch( ch ) { switch( ch ) {
case 'h': case 'h':

Loading…
Cancel
Save