tcl/interface: add SPDX tag
[fw/openocd] / src / rtos / rtos.c
index 0e747e3e4c512158f02554b867a5996636e28c31..f401c3d30bdacfe7b07b6c1d5f6324b35ff64c6c 100644 (file)
@@ -234,7 +234,7 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s
        uint64_t addr = 0;
        size_t reply_len;
        char reply[GDB_BUFFER_SIZE + 1], cur_sym[GDB_BUFFER_SIZE / 2 + 1] = ""; /* Extra byte for null-termination */
-       struct symbol_table_elem *next_sym = NULL;
+       struct symbol_table_elem *next_sym;
        struct target *target = get_target_from_connection(connection);
        struct rtos *os = target->rtos;
 
@@ -272,7 +272,7 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s
        next_sym = next_symbol(os, cur_sym, addr);
 
        /* Should never happen unless the debugger misbehaves */
-       if (next_sym == NULL) {
+       if (!next_sym) {
                LOG_WARNING("RTOS: Debugger sent us qSymbol with '%s' that we did not ask for", cur_sym);
                goto done;
        }
@@ -616,7 +616,7 @@ int rtos_generic_stack_read(struct target *target,
                LOG_OUTPUT("\r\n");
 #endif
 
-       int64_t new_stack_ptr;
+       target_addr_t new_stack_ptr;
        if (stacking->calculate_process_stack) {
                new_stack_ptr = stacking->calculate_process_stack(target,
                                stack_data, stacking, stack_ptr);