Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
ba9e2f49
Commit
ba9e2f49
authored
Jan 16, 2017
by
Thomas Jahns
🤸
Browse files
Use known length instead instead of string terminator scan.
parent
2c52a42b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
ba9e2f49
...
...
@@ -216,7 +216,7 @@ int setBaseTime(const char *timeunits, taxis_t *taxis)
}
size_t
pos
=
0
;
while
(
!
isspace
(
tu
[
pos
])
&&
tu
[
pos
]
!=
0
)
++
pos
;
while
(
pos
<
len
&&
!
isspace
(
tu
[
pos
])
)
++
pos
;
if
(
tu
[
pos
]
)
{
while
(
isspace
(
tu
[
pos
])
)
++
pos
;
...
...
@@ -224,7 +224,7 @@ int setBaseTime(const char *timeunits, taxis_t *taxis)
if
(
str_is_equal
(
tu
+
pos
,
"since"
)
)
timetype
=
TAXIS_RELATIVE
;
while
(
!
isspace
(
tu
[
pos
])
&&
tu
[
pos
]
!=
0
)
++
pos
;
while
(
pos
<
len
&&
!
isspace
(
tu
[
pos
])
)
++
pos
;
if
(
tu
[
pos
]
)
{
while
(
isspace
(
tu
[
pos
])
)
++
pos
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment