This commit is contained in:
Olof hagsand 2019-12-31 13:30:52 +01:00
commit 50420cb262
9 changed files with 11 additions and 11 deletions

View file

@ -388,7 +388,7 @@ xml2buf(FILE *f,
goto done;
}
memcpy(buf0, hdr, sizeof(hdr));
if (fwrite(buf0, sizeof(char), len, f) < 0){
if (fwrite(buf0, sizeof(char), len, f) == 0){
clicon_err(OE_XML, errno, "fwrite");
goto done;
}

View file

@ -377,7 +377,7 @@ clicon_msg_rcv(int s,
goto done;
}
memcpy(*msg, &hdr, hlen);
if ((len2 = atomicio(read, s, (*msg)->op_body, mlen - sizeof(hdr))) < 0){
if ((len2 = atomicio(read, s, (*msg)->op_body, mlen - sizeof(hdr))) == 0){
clicon_err(OE_CFG, errno, "read");
goto done;
}

View file

@ -631,7 +631,7 @@ clicon_rpc_get(clicon_handle h,
NETCONF_BASE_PREFIX, NETCONF_BASE_NAMESPACE);
cprintf(cb, "><get");
/* Clixon extension, content=all,config, or nonconfig */
if (content != -1)
if ((int)content != -1)
cprintf(cb, " content=\"%s\"", netconf_content_int2str(content));
/* Clixon extension, depth=<level> */
if (depth != -1)

View file

@ -3180,7 +3180,7 @@ yang_apply(yang_stmt *yn,
for (i=0; i<yn->ys_len; i++){
ys = yn->ys_stmt[i];
if (keyword == -1 || keyword == ys->ys_keyword){
if ((int)keyword == -1 || keyword == ys->ys_keyword){
if ((ret = fn(ys, arg)) < 0)
goto done;
if (ret > 0){
@ -3265,7 +3265,7 @@ schema_nodeid_vec(yang_stmt *yn,
ys = yn->ys_stmt[i];
if (!yang_schemanode(ys))
continue;
if (keyword != -1 && keyword != ys->ys_keyword)
if ((int)keyword != -1 && keyword != ys->ys_keyword)
continue;
/* some keys dont have arguments, match on key */
if (ys->ys_keyword == Y_INPUT || ys->ys_keyword == Y_OUTPUT){