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
a17c14dc
Commit
a17c14dc
authored
Jun 02, 2015
by
Thomas Jahns
🤸
Browse files
Eliminate replacement myAsprintf by using sprintf in grib iterator.
parent
95eaa352
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/iterator_grib.c
View file @
a17c14dc
...
...
@@ -11,6 +11,7 @@
#include
"zaxis.h"
#include
<assert.h>
#include
<limits.h>
#include
<stdlib.h>
#include
<string.h>
...
...
@@ -122,7 +123,8 @@ char* cdiGribIterator_serialize(CdiIterator* super)
const
char
*
path
=
cdiInputFile_getPath
(
me
->
file
);
char
*
escapedPath
=
cdiEscapeSpaces
(
path
);
char
*
result
=
myAsprintf
(
"%s %zu"
,
escapedPath
,
me
->
fileOffset
);
char
*
result
=
xmalloc
(
strlen
(
escapedPath
)
+
3
*
sizeof
(
int
)
*
CHAR_BIT
/
8
);
sprintf
(
result
,
"%s %zu"
,
escapedPath
,
me
->
fileOffset
);
free
(
escapedPath
);
return
result
;
}
...
...
Write
Preview
Supports
Markdown
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