Skip to content

Commit

Permalink
Fix some scan-build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
petere committed Feb 9, 2022
1 parent b0337bf commit e051e24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions usual/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,11 @@ static bool parse_string(struct JsonContext *ctx, const char **src_p, const char

static bool skip_comment(struct JsonContext *ctx, const char **src_p, const char *end)
{
const char *s, *start;
const char *s;
char c;
size_t lnr;

s = start = *src_p;
s = *src_p;
if (s >= end)
return false;
c = *s++;
Expand Down
2 changes: 1 addition & 1 deletion usual/tls/tls_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tls_connect_servername(struct tls *ctx, const char *host, const char *port,
* If port is NULL try to extract a port from the specified host,
* otherwise use the default.
*/
if ((p = (char *)port) == NULL) {
if (port == NULL) {
ret = tls_host_port(host, &hs, &ps);
if (ret == -1) {
tls_set_errorx(ctx, "memory allocation failure");
Expand Down
2 changes: 1 addition & 1 deletion usual/tls/tls_ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ static int
tls_ocsp_common_query(struct tls **ocsp_ctx_p, int *fd_p, struct tls_config *config, struct tls *target)
{
struct tls *ctx = NULL;
int ret, fd;
int ret, fd = -1;

/* async path */
if (fd_p)
Expand Down

0 comments on commit e051e24

Please sign in to comment.