MXS-1618 Use right type for the return value of getopt_long
getopt_long returns an 'int'. If 'char' is used on a big-endian platform you'll end up with an infinite loop.
This commit is contained in:
parent
7a81f77649
commit
bafe8f5eeb
@ -142,7 +142,7 @@ main(int argc, char **argv)
|
||||
bool use_unix_socket = false;
|
||||
|
||||
int option_index = 0;
|
||||
char c;
|
||||
int c;
|
||||
while ((c = getopt_long(argc, argv, "h:p::P:u:S:v?ei",
|
||||
long_options, &option_index)) >= 0)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ int main(int argc, char **argv)
|
||||
char *key_file = NULL;
|
||||
char *aes_algo = NULL;
|
||||
int report_header = 0;
|
||||
char c;
|
||||
int c;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "dVfMHK:A:?", long_options, &option_index)) >= 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user