Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153196762
D26791.id79518.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
786 B
Referenced Files
None
Subscribers
None
D26791.id79518.diff
View Options
Index: sbin/nvmecontrol/firmware.c
===================================================================
--- sbin/nvmecontrol/firmware.c
+++ sbin/nvmecontrol/firmware.c
@@ -158,8 +158,9 @@
update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug)
{
struct nvme_pt_command pt;
- uint64_t max_xfer_size;
- int32_t off, resid, size;
+ uint64_t max_xfer_size;
+ int32_t off;
+ uint32_t resid, size;
void *chunk;
off = 0;
@@ -176,8 +177,7 @@
errx(1, "unable to malloc %zd bytes", (size_t)max_xfer_size);
while (resid > 0) {
- size = (resid >= (int32_t)max_xfer_size) ?
- max_xfer_size : resid;
+ size = (resid >= max_xfer_size) ? max_xfer_size : resid;
memcpy(chunk, payload + off, size);
memset(&pt, 0, sizeof(pt));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 6:06 PM (1 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31855819
Default Alt Text
D26791.id79518.diff (786 B)
Attached To
Mode
D26791: [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4
Attached
Detach File
Event Timeline
Log In to Comment