From 4002d0f378ed6cb2552a6272701c62b2be423cfc Mon Sep 17 00:00:00 2001 From: Brian Ezequiel Marchi Date: Thu, 17 Oct 2019 09:49:03 -0300 Subject: [PATCH] Satisfy uncrustify and address pr comments Signed-off-by: Brian Ezequiel Marchi --- rcl/include/rcl/localhost.h | 8 ++++---- rcl/src/rcl/localhost.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rcl/include/rcl/localhost.h b/rcl/include/rcl/localhost.h index 9dd5b33ac..be41615d8 100644 --- a/rcl/include/rcl/localhost.h +++ b/rcl/include/rcl/localhost.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RCL__LOCALHOST_H -#define RCL__LOCALHOST_H +#ifndef RCL__LOCALHOST_H_ +#define RCL__LOCALHOST_H_ #ifdef __cplusplus extern "C" @@ -23,7 +23,7 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" -extern const char * RCL_LOCALHOST_ENV_VAR; +extern const char * const RCL_LOCALHOST_ENV_VAR; /// Determine if the user wants to communicate using loopback only. /** @@ -39,4 +39,4 @@ rcl_localhost_only(); } #endif -#endif // RCL__LOCALHOST_H +#endif // RCL__LOCALHOST_H_ diff --git a/rcl/src/rcl/localhost.c b/rcl/src/rcl/localhost.c index e428848a6..1d5945ad3 100644 --- a/rcl/src/rcl/localhost.c +++ b/rcl/src/rcl/localhost.c @@ -14,17 +14,17 @@ #include -#include "rcutils/get_env.h" - #include #include -const char * RCL_LOCALHOST_ENV_VAR = "ROS_LOCALHOST_ONLY"; +#include "rcutils/get_env.h" + +const char * const RCL_LOCALHOST_ENV_VAR = "ROS_LOCALHOST_ONLY"; bool rcl_localhost_only() { const char * ros_local_host_env_val = NULL; return rcutils_get_env(RCL_LOCALHOST_ENV_VAR, &ros_local_host_env_val) == NULL && - ros_local_host_env_val != NULL && strcmp(ros_local_host_env_val, "1") == 0; + ros_local_host_env_val != NULL && strcmp(ros_local_host_env_val, "1") == 0; }