Skip to contentSkip to conversation

tools/mkenvimage.c: Fix a merge issue

PATCH New Horst Kronstorfer 3 participants 4 messages Dec 24, 2011 – Jan 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/mkenvimage.c: Fix a merge issue

With bfcc40bb09b05c90cc3b1496abb270eb8aa72134 'optopt' was reverted.

---
 tools/mkenvimage.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/mkenvimage.c +2 -2
index c5ed373..8ee2bd0 100644
@@ -122,11 +122,11 @@ int main(int argc, char **argv)
 			return EXIT_SUCCESS;
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
-				option);
+				optopt);
 			usage(argv[0]);
 			return EXIT_FAILURE;
 		default:
-			fprintf(stderr, "Wrong option -%c\n", option);
+			fprintf(stderr, "Wrong option -%c\n", optopt);
 			usage(prg);
 			return EXIT_FAILURE;
 		}
Signature · 1 line
1.7.7.4
#1 lore raw

PATCH 1/1 tools/mkenvimage.c: Fix a merge issue

Dear Horst Kronstorfer,

Quoted 14 lines · In message <[email protected]> you…

With bfcc40bb09b05c90cc3b1496abb270eb8aa72134 'optopt' was reverted.

---
 tools/mkenvimage.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/mkenvimage.c +0 -0
index c5ed373..8ee2bd0 100644
@@ -122,11 +122,11 @@ int main(int argc, char **argv)
 			return EXIT_SUCCESS;
 		case ':':

tools/mkenvimage.c int main(int argc, char **argv) · line 131

Quoted 10 lines
tools/mkenvimage.c +2 -2
 			fprintf(stderr, "Missing argument for option -%c\n",
-				option);
+				optopt);
 			usage(argv[0]);
 			return EXIT_FAILURE;
 		default:
-			fprintf(stderr, "Wrong option -%c\n", option);
+			fprintf(stderr, "Wrong option -%c\n", optopt);
 			usage(prg);
 			return EXIT_FAILURE;

This change is definitely wrong, as "optopt" is nowhere declared nor used in tools/mkenvimage.c

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The game of life is a game of boomerangs.  Our  thoughts,  deeds  and
words return to us sooner or later with astounding accuracy.
#2 lore raw

PATCH 1/1 tools/mkenvimage.c: Fix a merge issue

Quoted 22 lines · Wolfgang Denk

Dear Horst Kronstorfer,

Quoted 19 lines · In message<[email protected]> you…

With bfcc40bb09b05c90cc3b1496abb270eb8aa72134 'optopt' was reverted.

---
  tools/mkenvimage.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
tools/mkenvimage.c +1 -1
index c5ed373..8ee2bd0 100644
@@ -122,11 +122,11 @@ int main(int argc, char **argv)
  			return EXIT_SUCCESS;
  		case ':':
  			fprintf(stderr, "Missing argument for option -%c\n",
-				option);
+				optopt);
  			usage(argv[0]);
  			return EXIT_FAILURE;
Quoted 9 lines

tools/mkenvimage.c int main(int argc, char **argv) · line 131

Quoted 5 lines
tools/mkenvimage.c +1 -1
  		default:
-			fprintf(stderr, "Wrong option -%c\n", option);
+			fprintf(stderr, "Wrong option -%c\n", optopt);
  			usage(prg);
  			return EXIT_FAILURE;

This change is definitely wrong, as "optopt" is nowhere declared nor used in tools/mkenvimage.c

'optopt' is declared in unistd.h ... see 'man 3 getopt.'

br
-h

Quoted 5 lines

Best regards,

Wolfgang Denk

#3 lore raw

PATCH 1/1 tools/mkenvimage.c: Fix a merge issue

In reply to Horst Kronstorfer

Dear Horst Kronstorfer,

Quoted 6 lines · In message <[email protected]> you…

With bfcc40bb09b05c90cc3b1496abb270eb8aa72134 'optopt' was reverted.

---
 tools/mkenvimage.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The net result is a system that is not only binary  compatible  with
4.3  BSD, but is even bug for bug compatible in almost all features."
- Avadit  Tevanian,  Jr.,  "Architecture-Independent  Virtual  Memory
Management  for  Parallel  and  Distributed  Environments:  The  Mach
Approach"