From: Steve Guminski Date: Mon, 7 Aug 2017 17:17:31 +0000 (-0400) Subject: LU-6210 lnet: Use C99 struct initializer in framework.c X-Git-Tag: 2.10.53~33 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=60c9a2d351d40b5306b586d08847b6c7727b73cf;p=fs%2Flustre-release.git LU-6210 lnet: Use C99 struct initializer in framework.c This patch makes no functional changes. The struct initializer in framework.c is updated to C99 syntax. C89 positional initializers require values to be placed in the correct order. This will cause errors if the fields of the struct definition are reordered or fields are added or removed. C99 named initializers avoid this problem, and also automatically clear any values that are not explicitly set. Test-Parameters: trivial Signed-off-by: Steve Guminski Change-Id: Id54894c6f9476a5bf3b9cb5077ca324703c28da4 Reviewed-on: https://review.whamcloud.com/28436 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andreas Dilger --- diff --git a/lnet/selftest/framework.c b/lnet/selftest/framework.c index b85dbb5..3119cf8 100644 --- a/lnet/selftest/framework.c +++ b/lnet/selftest/framework.c @@ -1605,42 +1605,13 @@ sfw_post_rpc(struct srpc_client_rpc *rpc) } static struct srpc_service sfw_services[] = { - { - /* sv_id */ SRPC_SERVICE_DEBUG, - /* sv_name */ "debug", - 0 - }, - { - /* sv_id */ SRPC_SERVICE_QUERY_STAT, - /* sv_name */ "query stats", - 0 - }, - { - /* sv_id */ SRPC_SERVICE_MAKE_SESSION, - /* sv_name */ "make session", - 0 - }, - { - /* sv_id */ SRPC_SERVICE_REMOVE_SESSION, - /* sv_name */ "remove session", - 0 - }, - { - /* sv_id */ SRPC_SERVICE_BATCH, - /* sv_name */ "batch service", - 0 - }, - { - /* sv_id */ SRPC_SERVICE_TEST, - /* sv_name */ "test service", - 0 - }, - { - /* sv_id */ 0, - /* sv_name */ NULL, - 0 - } -}; + { .sv_id = SRPC_SERVICE_DEBUG, .sv_name = "debug", }, + { .sv_id = SRPC_SERVICE_QUERY_STAT, .sv_name = "query stats", }, + { .sv_id = SRPC_SERVICE_MAKE_SESSION, .sv_name = "make session", }, + { .sv_id = SRPC_SERVICE_REMOVE_SESSION, .sv_name = "remove session", }, + { .sv_id = SRPC_SERVICE_BATCH, .sv_name = "batch service", }, + { .sv_id = SRPC_SERVICE_TEST, .sv_name = "test service", }, + { .sv_id = 0, } }; int sfw_startup (void)