summaryrefslogtreecommitdiff
path: root/src/helper/ioutil.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:42:03 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:42:03 +0000
commit3813fda44adcea486b7308423a699f63d79273ee (patch)
treef515b454cfaea4806d0d307c1d19f1e3081482d1 /src/helper/ioutil.c
parentaea6815462d3302f7f8b6576f59320d5f5985642 (diff)
downloadopenocd+libswd-3813fda44adcea486b7308423a699f63d79273ee.tar.gz
openocd+libswd-3813fda44adcea486b7308423a699f63d79273ee.tar.bz2
openocd+libswd-3813fda44adcea486b7308423a699f63d79273ee.tar.xz
openocd+libswd-3813fda44adcea486b7308423a699f63d79273ee.zip
- Fixes '==' whitespace
- Replace ')\(==\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/ioutil.c')
-rw-r--r--src/helper/ioutil.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c
index 4c09b779..8f02e2eb 100644
--- a/src/helper/ioutil.c
+++ b/src/helper/ioutil.c
@@ -84,7 +84,7 @@ int loadFile(const char *fileName, void **data, size_t *len)
FILE * pFile;
pFile = fopen(fileName,"rb");
- if (pFile==NULL)
+ if (pFile == NULL)
{
LOG_ERROR("Can't open %s\n", fileName);
return ERROR_FAIL;
@@ -111,7 +111,7 @@ int loadFile(const char *fileName, void **data, size_t *len)
return ERROR_FAIL;
}
*data = malloc(*len + 1);
- if (*data==NULL)
+ if (*data == NULL)
{
LOG_ERROR("Can't open %s\n", fileName);
fclose(pFile);
@@ -233,7 +233,7 @@ int handle_append_command(struct command_context_s *cmd_ctx, char *cmd,
break;
}
}
- if ((i==argc) && (fwrite("\n", 1, 1, config_file)==1))
+ if ((i == argc) && (fwrite("\n", 1, 1, config_file) == 1))
{
retval=ERROR_OK;
}
@@ -274,7 +274,7 @@ int handle_cp_command(struct command_context_s *cmd_ctx, char *cmd, char **args,
chunk = maxChunk;
}
- if ((retval==ERROR_OK) && (fwrite(((char *)data)+pos, 1, chunk, f) != chunk))
+ if ((retval == ERROR_OK) && (fwrite(((char *)data)+pos, 1, chunk, f) != chunk))
retval = ERROR_INVALID_ARGUMENTS;
if (retval != ERROR_OK)
@@ -363,7 +363,7 @@ void copydir(char *name, char *destdir)
DIR *dirp;
dirp = opendir(destdir);
- if (dirp==NULL)
+ if (dirp == NULL)
{
mkdir(destdir, 0777);
} else
@@ -477,7 +477,7 @@ zylinjtag_Jim_Command_ls(Jim_Interp *interp,
if (entry == NULL)
break;
- if ((strcmp(".", entry->d_name)==0)||(strcmp("..", entry->d_name)==0))
+ if ((strcmp(".", entry->d_name) == 0)||(strcmp("..", entry->d_name) == 0))
continue;
Jim_ListAppendElement(interp, objPtr, Jim_NewStringObj(interp, entry->d_name, strlen(entry->d_name)));