0014-Fix-option-parsing-errors-introduced-in-59e470381f84.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 137e9f878fafb38369eab7d9dfe84e4228ff5f89 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <[email protected]>
  3. Date: Sun, 16 Dec 2018 21:25:29 +0000
  4. Subject: [PATCH 14/30] Fix option parsing errors introduced in
  5. 59e470381f84f2fdf0640c7bc67827f3f0c64784
  6. Thanks to Kevin Darbyshire-Bryant for spotting this.
  7. Signed-off-by: Kevin Darbyshire-Bryant <[email protected]>
  8. ---
  9. src/option.c | 6 +++---
  10. 1 file changed, 3 insertions(+), 3 deletions(-)
  11. --- a/src/option.c
  12. +++ b/src/option.c
  13. @@ -3432,7 +3432,7 @@ static int one_opt(int option, char *arg
  14. {
  15. struct dhcp_netid *id = dhcp_tags(&arg);
  16. - if (!id)
  17. + if (!arg)
  18. {
  19. ret_err(gen_err);
  20. }
  21. @@ -3483,7 +3483,7 @@ static int one_opt(int option, char *arg
  22. {
  23. struct dhcp_netid *id = dhcp_tags(&arg);
  24. - if (!id)
  25. + if (!arg)
  26. {
  27. ret_err(gen_err);
  28. }
  29. @@ -3513,7 +3513,7 @@ static int one_opt(int option, char *arg
  30. new->opt = 10; /* PXE_MENU_PROMPT */
  31. new->netid = dhcp_tags(&arg);
  32. - if (!new->netid)
  33. + if (!arg)
  34. {
  35. dhcp_opt_free(new);
  36. ret_err(gen_err);