command: log the command only when it is executed
[openocd.git] / src / helper / options.c
index f996749ea88bace77de5e2b830edd3857cb9a6ea..199672789b865e16185dfd2eee1da02df6a936b4 100644 (file)
@@ -75,7 +75,7 @@ static char *find_exe_path(void)
        do {
 #if IS_WIN32 && !IS_CYGWIN
                exepath = malloc(MAX_PATH);
-               if (exepath == NULL)
+               if (!exepath)
                        break;
                GetModuleFileName(NULL, exepath, MAX_PATH);
 
@@ -87,7 +87,7 @@ static char *find_exe_path(void)
 
 #elif IS_DARWIN
                exepath = malloc(PROC_PIDPATHINFO_MAXSIZE);
-               if (exepath == NULL)
+               if (!exepath)
                        break;
                if (proc_pidpath(getpid(), exepath, PROC_PIDPATHINFO_MAXSIZE) <= 0) {
                        free(exepath);
@@ -99,7 +99,7 @@ static char *find_exe_path(void)
 #define PATH_MAX 1024
 #endif
                char *path = malloc(PATH_MAX);
-               if (path == NULL)
+               if (!path)
                        break;
                int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
                size_t size = PATH_MAX;
@@ -117,14 +117,14 @@ static char *find_exe_path(void)
 #elif defined(HAVE_REALPATH) /* Assume POSIX.1-2008 */
                /* Try Unices in order of likelihood. */
                exepath = realpath("/proc/self/exe", NULL); /* Linux/Cygwin */
-               if (exepath == NULL)
+               if (!exepath)
                        exepath = realpath("/proc/self/path/a.out", NULL); /* Solaris */
-               if (exepath == NULL)
+               if (!exepath)
                        exepath = realpath("/proc/curproc/file", NULL); /* FreeBSD (Should be covered above) */
 #endif
        } while (0);
 
-       if (exepath != NULL) {
+       if (exepath) {
                /* Strip executable file name, leaving path */
                *strrchr(exepath, '/') = '\0';
        } else {
@@ -163,7 +163,7 @@ static char *find_relative_path(const char *from, const char *to)
                if (from[0] != '/')
                        i++;
                char *next = strchr(from, '/');
-               if (next == NULL)
+               if (!next)
                        break;
                from = next + 1;
        }

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)