Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
208bf7df
Commit
208bf7df
authored
4 years ago
by
Florian Prill
Browse files
Options
Downloads
Patches
Plain Diff
[event_generic_review] removed obsolete constant; renamed another one.
parent
089a7cf1
No related branches found
No related tags found
1 merge request
!3
WIP: Event generic
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/mtime_eventBasic.h
+1
-3
1 addition, 3 deletions
include/mtime_eventBasic.h
src/mtime_eventBasic.c
+5
-5
5 additions, 5 deletions
src/mtime_eventBasic.c
with
6 additions
and
8 deletions
include/mtime_eventBasic.h
+
1
−
3
View file @
208bf7df
...
...
@@ -23,10 +23,8 @@
#include
"mtime_julianDay.h"
///provides a Maximum string length for Group Names.
#define MAX_GROUPNAME_STR_LEN 132
///provides a Maximum string length for Event names.
#define MAX_EVENTNAME_STR_LEN 132
#define MAX_
BASIC
EVENTNAME_STR_LEN 132
struct
_datetime
;
struct
t_event_basic_cache
;
...
...
This diff is collapsed.
Click to expand it.
src/mtime_eventBasic.c
+
5
−
5
View file @
208bf7df
...
...
@@ -254,11 +254,11 @@ newBasicEventWithDataType(const char* _en,
int
ret
=
0
;
/* Copy event name. */
e
->
eventName
=
(
char
*
)
calloc
(
MAX_EVENTNAME_STR_LEN
,
sizeof
(
char
));
e
->
eventName
=
(
char
*
)
calloc
(
MAX_
BASIC
EVENTNAME_STR_LEN
,
sizeof
(
char
));
if
(
e
->
eventName
==
NULL
)
goto
cleanup_and_exit
;
strncpy
(
e
->
eventName
,
_en
,
MAX_EVENTNAME_STR_LEN
-
1
);
e
->
eventName
[
MAX_EVENTNAME_STR_LEN
-
1
]
=
'\0'
;
strncpy
(
e
->
eventName
,
_en
,
MAX_
BASIC
EVENTNAME_STR_LEN
-
1
);
e
->
eventName
[
MAX_
BASIC
EVENTNAME_STR_LEN
-
1
]
=
'\0'
;
/* Start Date. Default start date = "0-01-01T00:00:00.000". */
if
(
eventFirstDT
)
...
...
@@ -525,8 +525,8 @@ getBasicEventName(struct t_event_basic* e, char* ename)
{
if
((
e
!=
NULL
)
&&
(
ename
!=
NULL
))
{
strncpy
(
ename
,
e
->
eventName
,
MAX_EVENTNAME_STR_LEN
-
1
);
ename
[
MAX_EVENTNAME_STR_LEN
-
1
]
=
'\0'
;
strncpy
(
ename
,
e
->
eventName
,
MAX_
BASIC
EVENTNAME_STR_LEN
-
1
);
ename
[
MAX_
BASIC
EVENTNAME_STR_LEN
-
1
]
=
'\0'
;
return
ename
;
}
else
...
...
This diff is collapsed.
Click to expand it.
Florian Prill
@m300196
mentioned in merge request
!3 (closed)
·
4 years ago
mentioned in merge request
!3 (closed)
mentioned in merge request !3
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment