summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-06-19 15:57:38 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-06-19 15:57:38 (GMT)
commit48e1bbb0f87c6712189f82a7c5d8835a87d21ee2 (patch)
tree5f22350f85d053d8137be356dafa8b824122cd44 /tools
parentc614e178e32188bde97f1cf692bb2c15d97135df (diff)
downloadhdf5-48e1bbb0f87c6712189f82a7c5d8835a87d21ee2.zip
hdf5-48e1bbb0f87c6712189f82a7c5d8835a87d21ee2.tar.gz
hdf5-48e1bbb0f87c6712189f82a7c5d8835a87d21ee2.tar.bz2
[svn-r27252] Fix whitespace
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools_str.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index b945847..470620f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1386,23 +1386,23 @@ h5tools_str_is_zero(const void *_mem, size_t size)
char *
h5tools_str_replace ( const char *string, const char *substr, const char *replacement )
{
- char *tok = NULL;
- char *newstr = NULL;
- char *oldstr = NULL;
- char *head = NULL;
-
- if ( substr == NULL || replacement == NULL )
- return HDstrdup (string);
-
- newstr = HDstrdup (string);
- head = newstr;
- while ( (tok = HDstrstr ( head, substr ))){
- oldstr = newstr;
- newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 );
+ char *tok = NULL;
+ char *newstr = NULL;
+ char *oldstr = NULL;
+ char *head = NULL;
+
+ if ( substr == NULL || replacement == NULL )
+ return HDstrdup (string);
+
+ newstr = HDstrdup (string);
+ head = newstr;
+ while ( (tok = HDstrstr ( head, substr ))){
+ oldstr = newstr;
+ newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 );
if ( newstr == NULL ){
- HDfree (oldstr);
- return NULL;
+ HDfree (oldstr);
+ return NULL;
}
HDmemcpy ( newstr, oldstr, tok - oldstr );
HDmemcpy ( newstr + (tok - oldstr), replacement, HDstrlen ( replacement ) );