formatting fixes from Pavel Chromy
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 29 Feb 2008 12:16:02 +0000 (12:16 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 29 Feb 2008 12:16:02 +0000 (12:16 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@392 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/log.c
src/server/telnet_server.c

index 85861988bc52a543732a312c1421eb19e345aa66..cdd7b7bfe512d2f82efd4860871fca1adebfa5bf 100644 (file)
@@ -48,7 +48,7 @@ static char *log_strings[5] =
 
 static int count = 0;
 
-/* The log_printfv() serves to somewhat different goals:
+/* The log_puts() serves to somewhat different goals:
  * 
  * - logging
  * - feeding low-level info to the user in GDB or Telnet
@@ -80,7 +80,7 @@ static void log_puts(enum log_levels level, const char *file, int line, const ch
                {
                        /* print with count and time information */
                        int t=(int)(time(NULL)-start);
-               fprintf(log_output, "%s %d %d %s:%d %s(): %s", log_strings[level+1], count, t, file, line, function, string);
+                       fprintf(log_output, "%s %d %d %s:%d %s(): %s", log_strings[level+1], count, t, file, line, function, string);
                }
                else
                {
@@ -249,9 +249,9 @@ int log_remove_callback(log_callback_fn fn, void *priv)
 
        for (p = &log_callbacks; (cb = *p); p = &(*p)->next)
        {
-           if (cb->fn == fn && cb->priv == priv)
-           {
-               *p = cb->next;
+               if (cb->fn == fn && cb->priv == priv)
+               {
+                       *p = cb->next;
                        free(cb);
                        return ERROR_OK;
                }
@@ -283,15 +283,15 @@ char *alloc_printf(const char *fmt, va_list ap)
                                return NULL;
                        }
        
-           int ret;
-           ret = vsnprintf(string, size, fmt, ap);
-           /* NB! The result of the vsnprintf() might be an *EMPTY* string! */
-           if ((ret >= 0) && ((ret + 1) < size))
+               int ret;
+               ret = vsnprintf(string, size, fmt, ap);
+               /* NB! The result of the vsnprintf() might be an *EMPTY* string! */
+               if ((ret >= 0) && ((ret + 1) < size))
                        break;
 
-           /* there was just enough or not enough space, allocate more in the next round */
+               /* there was just enough or not enough space, allocate more in the next round */
        }
        
        /* the returned buffer is by principle guaranteed to be at least one character longer */
-               return string;
+       return string;
 }
index e2f0e019cc591318603ba1636dda4592360e7260..1a9077983335ba172c44a51f034695c174086f96 100644 (file)
@@ -86,7 +86,7 @@ int telnet_outputline(connection_t *connection, const char *line)
                if (line_end)
                        len = line_end-line;
                else
-                   len = strlen(line);
+                       len = strlen(line);
 
                telnet_write(connection, line, len);
                if (line_end)
@@ -96,7 +96,7 @@ int telnet_outputline(connection_t *connection, const char *line)
                }
                else
                {
-                   line += len;
+                       line += len;
                }
        }
        
@@ -193,7 +193,7 @@ void telnet_clear_line(connection_t *connection, telnet_connection_t *t_con)
        {
                telnet_write(connection, t_con->line + t_con->line_cursor, t_con->line_size - t_con->line_cursor);
        }
-                                                       
+
        /* backspace, overwrite with space, backspace */
        while (t_con->line_size > 0)
        {

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)