Commit a17c14dc authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Eliminate replacement myAsprintf by using sprintf in grib iterator.

parent 95eaa352
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment