diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2021-12-25 19:53:11 +0100 |
---|---|---|
committer | Gerhard Sittig <gerhard.sittig@gmx.net> | 2021-12-26 13:45:09 +0100 |
commit | 487890c822762d9886dfd022ed599c9909ceaab9 (patch) | |
tree | fa5d44c6837c0bd165144060af026bbfd3d8e359 | |
parent | 7337906cd06569485cbb88ff837b1cfce29cfd48 (diff) | |
download | libsigrokdecode-487890c822762d9886dfd022ed599c9909ceaab9.tar.gz libsigrokdecode-487890c822762d9886dfd022ed599c9909ceaab9.zip |
type_decoder: eliminate explicit string length spec for literals
Rephrase the 'names[]' array declaration in output_type_name() to avoid
the necessity of guessing what the maximum length of the literals might
be during future maintenance. Developers need not care when the compiler
can handle this detail.
-rw-r--r-- | type_decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/type_decoder.c b/type_decoder.c index 38e0a03..0a92a45 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -33,7 +33,7 @@ typedef struct { /* This is only used for nicer srd_dbg() output. */ SRD_PRIV const char *output_type_name(unsigned int idx) { - static const char names[][16] = { + static const char *names[] = { "OUTPUT_ANN", "OUTPUT_PYTHON", "OUTPUT_BINARY", |