[Guardsoft-cvs] guard/src/gram map.c,1.3,1.4
Brought to you by:
jarrah
|
From: Greg W. <ja...@us...> - 2005-05-18 19:29:55
|
Update of /cvsroot/guardsoft/guard/src/gram In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8918 Modified Files: map.c Log Message: better error message for ApplyMap() Index: map.c =================================================================== RCS file: /cvsroot/guardsoft/guard/src/gram/map.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** map.c 26 Mar 2003 00:24:02 -0000 1.3 --- map.c 18 May 2005 19:29:44 -0000 1.4 *************** *** 162,167 **** AIFIndex * pix=NULL; ! if ( FDSType(type) != AIF_ARRAY || nd <= 0 ) return (AIF *)NULL; res = MakeAIF(strdup(type), NULL); --- 162,176 ---- AIFIndex * pix=NULL; ! if ( FDSType(type) != AIF_ARRAY ) ! { ! SetError("Result type of map is not an array"); return (AIF *)NULL; + } + + if ( nd <= 0 ) + { + SetError("Bad number of processes: %d", nd); + return (AIF *)NULL; + } res = MakeAIF(strdup(type), NULL); |