cast two more content_length u64 to usize
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 4m12s

This commit is contained in:
Emil Lerch 2023-08-27 15:43:40 -07:00
parent 8361431754
commit 7c40549200
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -243,7 +243,7 @@ fn getImdsRoleName(allocator: std.mem.Allocator, client: *std.http.Client, imds_
log.warn("Unexpected empty response from IMDS endpoint post token", .{});
return null;
}
var resp = try allocator.alloc(u8, req.response.content_length.?);
var resp = try allocator.alloc(u8, @intCast(req.response.content_length.?));
defer allocator.free(resp);
_ = try req.readAll(resp);
@ -296,7 +296,7 @@ fn getImdsCredentials(allocator: std.mem.Allocator, client: *std.http.Client, ro
log.warn("Unexpected empty response from IMDS role endpoint", .{});
return null;
}
var resp = try allocator.alloc(u8, req.response.content_length.?);
var resp = try allocator.alloc(u8, @intCast(req.response.content_length.?));
defer allocator.free(resp);
_ = try req.readAll(resp);