summaryrefslogtreecommitdiffstats
path: root/heimdall/source/SendFilePartPacket.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 05:12:07 +0200
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 05:12:07 +0200
commit46d9a51e18d260e416479432fec50c6e601eb3ce (patch)
treecefc1d72db4568715dfdcd737eba46ae289d1d52 /heimdall/source/SendFilePartPacket.h
parentGive devices some leeway to handle empty bulk transfers. (diff)
downloadHeimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.gz
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.bz2
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.lz
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.xz
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.tar.zst
Heimdall-46d9a51e18d260e416479432fec50c6e601eb3ce.zip
Diffstat (limited to 'heimdall/source/SendFilePartPacket.h')
-rw-r--r--heimdall/source/SendFilePartPacket.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/heimdall/source/SendFilePartPacket.h b/heimdall/source/SendFilePartPacket.h
index 6bbc086..3ecaa89 100644
--- a/heimdall/source/SendFilePartPacket.h
+++ b/heimdall/source/SendFilePartPacket.h
@@ -34,7 +34,7 @@ namespace Heimdall
{
public:
- SendFilePartPacket(FILE *file, int size) : OutboundPacket(size)
+ SendFilePartPacket(FILE *file, unsigned int size) : OutboundPacket(size)
{
memset(data, 0, size);
@@ -45,13 +45,13 @@ namespace Heimdall
fseek(file, position, SEEK_SET);
// min(fileSize, size)
- int bytesToRead = (fileSize < size) ? fileSize - position : size;
+ unsigned int bytesToRead = (fileSize < size) ? fileSize - position : size;
// bytesRead is discarded (it's just there to stop GCC warnings)
- int bytesRead = fread(data, 1, bytesToRead, file);
+ unsigned int bytesRead = fread(data, 1, bytesToRead, file);
}
- SendFilePartPacket(unsigned char *buffer, int size) : OutboundPacket(size)
+ SendFilePartPacket(unsigned char *buffer, unsigned int size) : OutboundPacket(size)
{
memcpy(data, buffer, size);
}