output_gnuplot: Simplify event().
This commit is contained in:
parent
d20ba6490a
commit
caf62e22c4
|
@ -117,8 +117,6 @@ static int event(struct output *o, int event_type, char **data_out,
|
||||||
uint64_t *length_out)
|
uint64_t *length_out)
|
||||||
{
|
{
|
||||||
struct context *ctx;
|
struct context *ctx;
|
||||||
char *outbuf;
|
|
||||||
int outlen = 1; /* FIXME */
|
|
||||||
|
|
||||||
ctx = o->internal;
|
ctx = o->internal;
|
||||||
switch (event_type) {
|
switch (event_type) {
|
||||||
|
@ -126,11 +124,8 @@ static int event(struct output *o, int event_type, char **data_out,
|
||||||
/* TODO */
|
/* TODO */
|
||||||
break;
|
break;
|
||||||
case DF_END:
|
case DF_END:
|
||||||
outbuf = calloc(1, 1); /* FIXME */
|
*data_out = NULL;
|
||||||
if (outbuf == NULL)
|
*length_out = 0;
|
||||||
return SIGROK_ERR_MALLOC;
|
|
||||||
*data_out = outbuf;
|
|
||||||
*length_out = outlen;
|
|
||||||
free(o->internal);
|
free(o->internal);
|
||||||
o->internal = NULL;
|
o->internal = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue