rename CEIL as DIV_ROUND_UP
[openocd.git] / src / target / target_request.c
index 721515552c9d0463c18b21d3052254caa85cc668..be176ca3e4b22516fabb5760226ef7e533efb3d8 100644 (file)
@@ -40,10 +40,10 @@ static int charmsg_mode = 0;
 
 static int target_asciimsg(struct target *target, uint32_t length)
 {
-       char *msg = malloc(CEIL(length + 1, 4) * 4);
+       char *msg = malloc(DIV_ROUND_UP(length + 1, 4) * 4);
        struct debug_msg_receiver *c = target->dbgmsg;
 
-       target->type->target_request_data(target, CEIL(length, 4), (uint8_t*)msg);
+       target->type->target_request_data(target, DIV_ROUND_UP(length, 4), (uint8_t*)msg);
        msg[length] = 0;
 
        LOG_DEBUG("%s", msg);
@@ -66,7 +66,7 @@ static int target_charmsg(struct target *target, uint8_t msg)
 
 static int target_hexmsg(struct target *target, int size, uint32_t length)
 {
-       uint8_t *data = malloc(CEIL(length * size, 4) * 4);
+       uint8_t *data = malloc(DIV_ROUND_UP(length * size, 4) * 4);
        char line[128];
        int line_len;
        struct debug_msg_receiver *c = target->dbgmsg;
@@ -74,7 +74,7 @@ static int target_hexmsg(struct target *target, int size, uint32_t length)
 
        LOG_DEBUG("size: %i, length: %i", (int)size, (int)length);
 
-       target->type->target_request_data(target, CEIL(length * size, 4), (uint8_t*)data);
+       target->type->target_request_data(target, DIV_ROUND_UP(length * size, 4), (uint8_t*)data);
 
        line_len = 0;
        for (i = 0; i < length; i++)

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)