mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Thanks to Ivan Stankovic
* write_lseek_blockwise: declare innerCount outside the if block * add -Wall to the default CFLAGS * fix some signedness issues git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@29 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -230,14 +230,13 @@ ssize_t write_lseek_blockwise(int fd, const char *buf, size_t count, off_t offse
|
||||
char frontPadBuf[bsize];
|
||||
int frontHang = offset % bsize;
|
||||
int r;
|
||||
int innerCount = count < bsize ? count : bsize;
|
||||
|
||||
if (bsize < 0)
|
||||
return bsize;
|
||||
|
||||
lseek(fd, offset - frontHang, SEEK_SET);
|
||||
if(offset % bsize) {
|
||||
int innerCount = count<bsize?count:bsize;
|
||||
|
||||
r = read(fd,frontPadBuf,bsize);
|
||||
if(r < 0) return -1;
|
||||
|
||||
@@ -346,7 +345,8 @@ out_err:
|
||||
* reading can be retried as for interactive terminals).
|
||||
*/
|
||||
|
||||
int get_key(char *prompt, char **key, int *passLen, int key_size, const char *key_file, int passphrase_fd, int timeout, int how2verify)
|
||||
int get_key(char *prompt, char **key, unsigned int *passLen, int key_size,
|
||||
const char *key_file, int passphrase_fd, int timeout, int how2verify)
|
||||
{
|
||||
int fd;
|
||||
const int verify = how2verify & CRYPT_FLAG_VERIFY;
|
||||
|
||||
Reference in New Issue
Block a user