Skip to content

Commit

Permalink
Fix struct tm init
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogs9 committed Apr 1, 2024
1 parent 9adc397 commit a2cbd84
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"*.uml": "plantuml",
"*.in": "c"
}
}
1 change: 1 addition & 0 deletions include/rcutils/configuration_flags.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extern "C"
#cmakedefine RCUTILS_NO_FILESYSTEM
#cmakedefine RCUTILS_AVOID_DYNAMIC_ALLOCATION
#cmakedefine RCUTILS_NO_THREAD_SUPPORT
#cmakedefine RCUTILS_MICROROS

#ifdef __cplusplus
}
Expand Down
8 changes: 8 additions & 0 deletions src/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ rcutils_time_point_value_as_date_string(
char * str,
size_t str_size)
{
#ifdef RCUTILS_MICROROS
(void)time_point;
(void)str;
(void)str_size;

return RCUTILS_RET_ERROR;
#else
RCUTILS_CHECK_ARGUMENT_FOR_NULL(time_point, RCUTILS_RET_INVALID_ARGUMENT);
RCUTILS_CHECK_ARGUMENT_FOR_NULL(str, RCUTILS_RET_INVALID_ARGUMENT);
if (0 == str_size) {
Expand Down Expand Up @@ -99,6 +106,7 @@ rcutils_time_point_value_as_date_string(
}

return RCUTILS_RET_OK;
#endif // RCUTILS_MICROROS
}

rcutils_ret_t
Expand Down

0 comments on commit a2cbd84

Please sign in to comment.