aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Masters <jcm@jonmasters.org>2009-05-27 18:27:46 -0400
committerJon Masters <jcm@jonmasters.org>2009-05-27 18:27:46 -0400
commit7046f4539b0eaceb6923981fd718a3c44d47a353 (patch)
tree9f436dbf86fe673b64befd0f99ee701c4d619c28
parentb9d6de8434a516f0d8ce3114b0af6c3355bf5ef6 (diff)
downloadmodule-init-tools-7046f4539b0eaceb6923981fd718a3c44d47a353.tar.gz
modindex: getopt_long returns int not char (fix ppc64 bug)
getopt_long returns an int and not a char. The existing code will fail a return test on ppc64 where the -1 comparison will never succeed, so instead garbage will exist in 'opt' at the end of the main while loop. Signed-off-by: Jon Masters <jcm@jonmasters.org>
-rw-r--r--modindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modindex.c b/modindex.c
index 2798838..24dec20 100644
--- a/modindex.c
+++ b/modindex.c
@@ -113,7 +113,7 @@ static struct option options[] = {
int main(int argc, char *argv[])
{
- char opt;
+ int opt;
char mode = 0;
char *filename = NULL;
char *key = NULL;