From 462a4d95a2a2ed8de484e1b5d7fe5bfbee74f66f Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Wed, 5 Apr 2017 13:23:37 +0200 Subject: [PATCH] cgraph.h: Each identifier in dedicated statement It is good practice to define each identifier in a dedicated statement, various standard and style guides recommend this. Because where multiple declarators appear in the same declaration, the type of an identifier may not meet a developer's expectations. --- lib/cgraph/cgraph.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/cgraph/cgraph.h b/lib/cgraph/cgraph.h index b68199f9d..adc58d750 100644 --- a/lib/cgraph/cgraph.h +++ b/lib/cgraph/cgraph.h @@ -2,7 +2,7 @@ /* vim:set shiftwidth=4 ts=8: */ /************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property + * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -360,11 +360,14 @@ CGRAPH_API int agsafeset(void* obj, char* name, char* value, char* def); /* defintions for subgraphs */ CGRAPH_API Agraph_t *agsubg(Agraph_t * g, char *name, int cflag); /* constructor */ CGRAPH_API Agraph_t *agidsubg(Agraph_t * g, IDTYPE id, int cflag); /* constructor */ -CGRAPH_API Agraph_t *agfstsubg(Agraph_t * g), *agnxtsubg(Agraph_t * subg); +CGRAPH_API Agraph_t *agfstsubg(Agraph_t * g); +CGRAPH_API Agraph_t *agnxtsubg(Agraph_t * subg); CGRAPH_API Agraph_t *agparent(Agraph_t * g); /* set cardinality */ -CGRAPH_API int agnnodes(Agraph_t * g), agnedges(Agraph_t * g), agnsubg(Agraph_t * g); +CGRAPH_API int agnnodes(Agraph_t * g); +CGRAPH_API int agnedges(Agraph_t * g); +CGRAPH_API int agnsubg(Agraph_t * g); CGRAPH_API int agdegree(Agraph_t * g, Agnode_t * n, int in, int out); CGRAPH_API int agcountuniqedges(Agraph_t * g, Agnode_t * n, int in, int out); @@ -412,8 +415,10 @@ CGRAPH_API agusererrf agseterrf(agusererrf); #define TAILPORT_ID "tailport" #define HEADPORT_ID "headport" -CGRAPH_API Agdesc_t Agdirected, Agstrictdirected, Agundirected, - Agstrictundirected; +CGRAPH_API Agdesc_t Agdirected; +CGRAPH_API Agdesc_t Agstrictdirected; +CGRAPH_API Agdesc_t Agundirected; +CGRAPH_API Agdesc_t Agstrictundirected; /* fast graphs */ void agflatten(Agraph_t * g, int flag); -- 2.40.0