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:
@ -142,7 +142,7 @@ main(int argc, char **argv)
|
|||||||
bool use_unix_socket = false;
|
bool use_unix_socket = false;
|
||||||
|
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
char c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "h:p::P:u:S:v?ei",
|
while ((c = getopt_long(argc, argv, "h:p::P:u:S:v?ei",
|
||||||
long_options, &option_index)) >= 0)
|
long_options, &option_index)) >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,7 +86,7 @@ int main(int argc, char **argv)
|
|||||||
char *key_file = NULL;
|
char *key_file = NULL;
|
||||||
char *aes_algo = NULL;
|
char *aes_algo = NULL;
|
||||||
int report_header = 0;
|
int report_header = 0;
|
||||||
char c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "dVfMHK:A:?", long_options, &option_index)) >= 0)
|
while ((c = getopt_long(argc, argv, "dVfMHK:A:?", long_options, &option_index)) >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user