All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [IGT PATCH] tools: terminate getopt_long long option arrays properly
Date: Wed,  1 Oct 2014 14:25:59 +0300	[thread overview]
Message-ID: <1412162759-1177-1-git-send-email-jani.nikula@intel.com> (raw)

The last element of the long options array has to be filled with zeros.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_dump_decode.c | 3 ++-
 tools/intel_infoframes.c  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/intel_dump_decode.c b/tools/intel_dump_decode.c
index a8dcca068bf2..0341aada4016 100644
--- a/tools/intel_dump_decode.c
+++ b/tools/intel_dump_decode.c
@@ -166,7 +166,8 @@ main (int argc, char *argv[])
 	static struct option long_options[] = {
 		{"devid", 1, 0, 'd'},
 		{"ascii", 0, 0, 'a'},
-		{"binary", 0, 0, 'b'}
+		{"binary", 0, 0, 'b'},
+		{ 0 }
 	};
 
 	devid_str = getenv("INTEL_DEVID_OVERRIDE");
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index e838fddfc963..e03cb2c06a52 100644
--- a/tools/intel_infoframes.c
+++ b/tools/intel_infoframes.c
@@ -1101,6 +1101,7 @@ int main(int argc, char *argv[])
 		{ "transcoder" ,        required_argument, NULL, 't' },
 		{ "infoframe",          required_argument, NULL, 'f' },
 		{ "help",               no_argument,       NULL, 'h' },
+		{ 0 }
 	};
 
 	printf("WARNING: This is just a debugging tool! Don't expect it to work"
-- 
1.9.1

                 reply	other threads:[~2014-10-01 11:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412162759-1177-1-git-send-email-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.