- Fixes '==' whitespace
[openocd.git] / src / target / target.c
index 89d2c88a617152ab2f633b58f28b5881f6e27b97..81d753e0d55897ddb874218917ed38e545df16df 100644 (file)
@@ -1079,7 +1079,7 @@ int target_register_commands(struct command_context_s *cmd_ctx)
 int target_arch_state(struct target_s *target)
 {
        int retval;
-       if (target==NULL)
+       if (target == NULL)
        {
                LOG_USER("No target has been configured");
                return ERROR_OK;
@@ -1851,7 +1851,7 @@ static int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, cha
                        return retval;
 
        }
-       else if (argc==1)
+       else if (argc == 1)
        {
                if (strcmp(args[0], "on") == 0)
                {
@@ -2314,7 +2314,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm
                return retvaltemp;
        }
 
-       if (retval==ERROR_OK)
+       if (retval == ERROR_OK)
        {
                command_print(cmd_ctx, "downloaded %u byte in %s", 
                                          (unsigned int)image_size, 
@@ -2390,7 +2390,7 @@ static int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cm
        if ((retvaltemp = duration_stop_measure(&duration, &duration_text)) != ERROR_OK)
                return retvaltemp;
 
-       if (retval==ERROR_OK)
+       if (retval == ERROR_OK)
        {
                command_print(cmd_ctx, "dumped %lld byte in %s",
                                fileio.size, duration_text);
@@ -2517,7 +2517,7 @@ static int handle_verify_image_command_internal(struct command_context_s *cmd_ct
                                                        retval=ERROR_FAIL;
                                                        goto done;
                                                }
-                                               if ((t%16384)==0)
+                                               if ((t%16384) == 0)
                                                {
                                                        keep_alive();
                                                }
@@ -2544,7 +2544,7 @@ done:
                return retvaltemp;
        }
 
-       if (retval==ERROR_OK)
+       if (retval == ERROR_OK)
        {
                command_print(cmd_ctx, "verified %u bytes in %s", 
                                          (unsigned int)image_size, 
@@ -2808,7 +2808,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, char *filename)
 {
        uint32_t i;
        FILE *f=fopen(filename, "w");
-       if (f==NULL)
+       if (f == NULL)
                return;
        writeString(f, "gmon");
        writeLong(f, 0x00000001); /* Version */
@@ -2843,7 +2843,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, char *filename)
                length=maxBuckets;
        }
        int *buckets=malloc(sizeof(int)*length);
-       if (buckets==NULL)
+       if (buckets == NULL)
        {
                fclose(f);
                return;
@@ -2918,7 +2918,7 @@ static int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd,
 
        static const int maxSample=10000;
        uint32_t *samples=malloc(sizeof(uint32_t)*maxSample);
-       if (samples==NULL)
+       if (samples == NULL)
                return ERROR_OK;
 
        int numSamples=0;
@@ -4432,7 +4432,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
        retval = ERROR_OK;
        fastload_num=image.num_sections;
        fastload=(struct FastLoad *)malloc(sizeof(struct FastLoad)*image.num_sections);
-       if (fastload==NULL)
+       if (fastload == NULL)
        {
                image_close(&image);
                return ERROR_FAIL;
@@ -4477,7 +4477,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
 
                        fastload[i].address=image.sections[i].base_address+offset;
                        fastload[i].data=malloc(length);
-                       if (fastload[i].data==NULL)
+                       if (fastload[i].data == NULL)
                        {
                                free(buffer);
                                break;
@@ -4495,7 +4495,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
        }
 
        duration_stop_measure(&duration, &duration_text);
-       if (retval==ERROR_OK)
+       if (retval == ERROR_OK)
        {
                command_print(cmd_ctx, "Loaded %u bytes in %s", (unsigned int)image_size, duration_text);
                command_print(cmd_ctx, "NB!!! image has not been loaded to target, issue a subsequent 'fast_load' to do so.");
@@ -4516,7 +4516,7 @@ static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd
 {
        if (argc>0)
                return ERROR_COMMAND_SYNTAX_ERROR;
-       if (fastload==NULL)
+       if (fastload == NULL)
        {
                LOG_ERROR("No image in memory");
                return ERROR_FAIL;
@@ -4531,7 +4531,7 @@ static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd
                command_print(cmd_ctx, "Write to 0x%08x, length 0x%08x", 
                                          (unsigned int)(fastload[i].address), 
                                          (unsigned int)(fastload[i].length));
-               if (retval==ERROR_OK)
+               if (retval == ERROR_OK)
                {
                        retval = target_write_buffer(target, fastload[i].address, fastload[i].length, fastload[i].data);
                }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)