Skip to content

Commit

Permalink
fix clang warnings in nbd-server.c
Browse files Browse the repository at this point in the history
  • Loading branch information
roker authored and yoe committed Apr 3, 2024
1 parent f0418b0 commit c1899cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbd-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ static void handle_normal_read(CLIENT *client, struct nbd_request *req)
} else {
ctx->is_structured = 0;
}
if(req->type & NBD_CMD_FLAG_DF != 0) {
if((req->type & NBD_CMD_FLAG_DF) != 0) {
ctx->df = 1;
}
if(ctx->is_structured && ctx->df && req->len > (1 << 20)) {
Expand Down Expand Up @@ -3312,7 +3312,7 @@ static int handle_childname(GArray* servers, int socket)
break;
}
}
if (len >= ULONG_MAX - 1) {
if (len >= UINT32_MAX - 1) {
err_nonfatal("Value out of range");
return -1;
}
Expand Down

0 comments on commit c1899cf

Please sign in to comment.