Skip to content
Snippets Groups Projects
Commit cc2d469b authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Replace strlen + xmalloc + strcpy with a single xstrdup.

Note that field_size is always reset later by _parse_token.
parent b493efc3
No related branches found
No related tags found
No related merge requests found
......@@ -246,9 +246,7 @@ extern int parse_format( char* format )
job_format_add_prefix( params.format_list, 0, 0, prefix);
}
field_size = strlen( format );
tmp_format = xmalloc( field_size + 1 );
strcpy( tmp_format, format );
tmp_format = xstrdup(format);
token = strtok_r( tmp_format, "%", &tmp_char);
if (token && (format[0] != '%')) /* toss header */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment