From 128a73342856217e98a5da64b2805e062fd4e00d Mon Sep 17 00:00:00 2001 From: zwelch Date: Tue, 23 Jun 2009 22:39:47 +0000 Subject: - Fixes '&&' whitespace - Replace ')\(&&\)(' with ') \1 ('. - Replace '\(\w\)\(&&\)(' with '\1 \2 ('. - Replace '\(\w\)\(&&\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2366 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/binarybuffer.h | 4 ++-- src/helper/ioutil.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/helper') diff --git a/src/helper/binarybuffer.h b/src/helper/binarybuffer.h index 01e8c1c0..710ec374 100644 --- a/src/helper/binarybuffer.h +++ b/src/helper/binarybuffer.h @@ -32,7 +32,7 @@ /* inlining this will help show what fn that is taking time during profiling. */ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int num, uint32_t value) { - if ((num==32)&&(first==0)) + if ((num==32) && (first==0)) { buffer[3]=(value>>24)&0xff; buffer[2]=(value>>16)&0xff; @@ -53,7 +53,7 @@ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int } static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, unsigned int num) { - if ((num==32)&&(first==0)) + if ((num==32) && (first==0)) { return (((uint32_t)buffer[3])<<24)|(((uint32_t)buffer[2])<<16)|(((uint32_t)buffer[1])<<8)|(((uint32_t)buffer[0])<<0); } else diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index de4e880a..4c09b779 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -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) -- cgit v1.2.3