{
char *buf;
buf = agget(g, attr);
- if ((!buf) || (*buf == '\0'))
+ if (!buf || *buf == '\0')
buf = agget(view->systemGraphs.def_attrs, attr);
return buf;
}
}
view->systemGraphs.attrs_widgets = agread(input_file2, NULL);
fclose (input_file2);
- if (!(view->systemGraphs.attrs_widgets )) {
+ if (!view->systemGraphs.attrs_widgets) {
fprintf(stderr,"could not load default attribute widgets graph file \"%s\"\n",smyrnaPath("attr_widgets.dot"));
graphviz_exit(-1);
}
}
void switch_graph(int graphId)
{
- if ((graphId >= view->graphCount) || (graphId < 0))
+ if (graphId >= view->graphCount || graphId < 0)
return; /*wrong entry */
else
activate(graphId);
static float interpol(float minv, float maxv, float minc, float maxc, float x)
{
- return ((x - minv) * (maxc - minc) / (maxv - minv) + minc);
+ return (x - minv) * (maxc - minc) / (maxv - minv) + minc;
}
void getcolorfromschema(colorschemaset * sc, float l, float maxl,