diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-29 15:52:39 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-29 16:21:12 +0100 |
commit | e2256b4f2506102be2c6f7976f84f0d607c53d43 (patch) | |
tree | 364d6a83f4ca654e2f123403eb684d6c3912db67 /print-someip.c | |
parent | cd0857c3b1d14425e3df7e322d7a7fe7db200eef (diff) | |
download | tcpdump-e2256b4f2506102be2c6f7976f84f0d607c53d43.tar.gz |
SOME/IP: Fix terminating a "struct tok" array
Moreover:
Declare static and const the "struct tok" arrays.
Diffstat (limited to 'print-someip.c')
-rw-r--r-- | print-someip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/print-someip.c b/print-someip.c index 3f3fcfc6..bd6a74f3 100644 --- a/print-someip.c +++ b/print-someip.c @@ -42,7 +42,7 @@ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ -struct tok message_type_values[] = { +static const struct tok message_type_values[] = { { 0x00, "REQUEST" }, { 0x01, "REQUEST_NO_RETURN" }, { 0x02, "NOTIFICATION" }, @@ -56,7 +56,7 @@ struct tok message_type_values[] = { { 0, NULL } }; -struct tok return_code_values[] = { +static const struct tok return_code_values[] = { { 0x00, "E_OK" }, { 0x01, "E_NOT_OK" }, { 0x02, "E_UNKNOWN_SERVICE" }, @@ -73,6 +73,7 @@ struct tok return_code_values[] = { { 0x0d, "E_E2E" }, { 0x0e, "E_E2E_NOT_AVAILABLE" }, { 0x0f, "E_E2E_NO_NEW_DATA" }, + { 0, NULL } }; void |