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
4a47f2cb
Commit
4a47f2cb
authored
Jun 02, 2015
by
Thomas Jahns
🤸
Browse files
Replace myAsprintf with sprintf for generic iterator.
parent
67c635b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/iterator.c
View file @
4a47f2cb
...
...
@@ -3,7 +3,6 @@
#include
"iterator_fallback.h"
#include
"iterator_grib.h"
#include
"cdi_int.h"
#include
"proprietarySystemWorkarounds.h"
#include
<assert.h>
#include
<ctype.h>
...
...
@@ -299,7 +298,11 @@ char* cdiIterator_serialize(CdiIterator* me)
return
NULL
;
}
char
*
result
=
myAsprintf
(
"%s %s %s"
,
fileType2String
(
me
->
filetype
),
(
me
->
isAdvanced
?
kAdvancedString
:
kUnadvancedString
),
subclassDescription
);
const
char
*
ftypeStr
=
fileType2String
(
me
->
filetype
),
*
advStr
=
me
->
isAdvanced
?
kAdvancedString
:
kUnadvancedString
;
char
*
result
=
xmalloc
(
strlen
(
ftypeStr
)
+
1
+
strlen
(
advStr
)
+
1
+
strlen
(
subclassDescription
)
+
1
);
sprintf
(
result
,
"%s %s %s"
,
ftypeStr
,
advStr
,
subclassDescription
);
free
(
subclassDescription
);
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