diff options
author | rideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2003-05-07 15:46:01 +0000 |
---|---|---|
committer | rideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2003-05-07 15:46:01 +0000 |
commit | fe14039aecb78c57c8e2144503ca256ba91edc14 (patch) | |
tree | 89bccd8c05372791430099067e724ca957502f63 | |
parent | a691db15f000d301780218fbf236db7456a85e94 (diff) |
Allow null pointers as arguments to Boundary_SelectedGVs.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@225 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r-- | src/Boundary.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/Boundary.c b/src/Boundary.c index 84c2f54..99ec619 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -831,12 +831,22 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH, printf(" current->next is %p\n",current->next); #endif - /* One should be able to pass NULL to ignore the values in any of these - arrays... */ - ((int *) faces)[i] = current->faces; - ((int *) widths)[i] = current->width; - ((int *) table_handles)[i] = current->table; - ((int *) var_indices)[i] = current->var; + if (faces) + { + ((int *) faces)[i] = current->faces; + } + if (widths) + { + ((int *) widths)[i] = current->width; + } + if (table_handles) + { + ((int *) table_handles)[i] = current->table; + } + if (var_indices) + { + ((int *) var_indices)[i] = current->var; + } } } } |