res->action = XBT_WORKLOAD_COMPUTE;
sscanf(words[++i], "%lg", &(res->d_arg));
} else {
- xbt_die(bprintf("Unparsable command: %s (in %s)", words[i], line));
+ xbt_die("Unparsable command: %s (in %s)", words[i], line);
}
i++;
if (words[i] && words[i][0] == '#') {
{
if (!cmd)
return;
- if (cmd->who)
- free(cmd->who);
- if (cmd->comment)
- free(cmd->comment);
- if (cmd->str_arg)
- free(cmd->str_arg);
+ free(cmd->who);
+ free(cmd->comment);
+ free(cmd->str_arg);
free(cmd);
}
free(addon);
break;
default:
- xbt_die(bprintf("Unknown command %d in '%s...'", cmd->action, res));
+ xbt_die("Unknown command %d in '%s...'", cmd->action, res);
}
if (cmd->comment) {
addon = bprintf(" (comment: %s)", cmd->comment);
{
FILE *file_in;
file_in = fopen(filename, "r");
- xbt_assert1(file_in, "cannot open tracefile '%s'", filename);
+ xbt_assert(file_in, "cannot open tracefile '%s'", filename);
char *str_in = xbt_str_from_file(file_in);
fclose(file_in);
xbt_dynar_t in = xbt_str_split(str_in, "\n");