remove trailing whitespace

This commit is contained in:
discomfitor 2011-08-13 04:06:30 -04:00 committed by Con Kolivas
parent 223a1107ea
commit 3316dd5505
6 changed files with 16 additions and 16 deletions

10
aes.c
View file

@ -61,10 +61,10 @@
* Forward S-box & tables * Forward S-box & tables
*/ */
static unsigned char FSb[256]; static unsigned char FSb[256];
static unsigned long FT0[256]; static unsigned long FT0[256];
static unsigned long FT1[256]; static unsigned long FT1[256];
static unsigned long FT2[256]; static unsigned long FT2[256];
static unsigned long FT3[256]; static unsigned long FT3[256];
/* /*
* Reverse S-box & tables * Reverse S-box & tables
@ -501,7 +501,7 @@ int aes_crypt_cbc( aes_context *ctx,
{ {
if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 ) if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 )
return( 0 ); return( 0 );
// If padlock data misaligned, we just fall back to // If padlock data misaligned, we just fall back to
// unaccelerated mode // unaccelerated mode
// //

View file

@ -35,7 +35,7 @@ static bool liblrzip_setup_flags(Lrzip *lr)
lr->control->flags |= FLAG_##X##_COMPRESS; \ lr->control->flags |= FLAG_##X##_COMPRESS; \
break break
switch (lr->mode) { switch (lr->mode) {
case LRZIP_MODE_DECOMPRESS: case LRZIP_MODE_DECOMPRESS:
lr->control->flags |= FLAG_DECOMPRESS; lr->control->flags |= FLAG_DECOMPRESS;
@ -257,13 +257,13 @@ bool lrzip_file_add(Lrzip *lr, FILE *file)
} }
lr->infiles[lr->infile_idx++] = file; lr->infiles[lr->infile_idx++] = file;
return true; return true;
} }
bool lrzip_file_del(Lrzip *lr, FILE *file) bool lrzip_file_del(Lrzip *lr, FILE *file)
{ {
size_t x; size_t x;
if ((!lr) || (!file)) return false; if ((!lr) || (!file)) return false;
if (!lr->infile_buckets) return true; if (!lr->infile_buckets) return true;
@ -313,7 +313,7 @@ bool lrzip_filename_add(Lrzip *lr, const char *file)
bool lrzip_filename_del(Lrzip *lr, const char *file) bool lrzip_filename_del(Lrzip *lr, const char *file)
{ {
size_t x; size_t x;
if ((!lr) || (!file) || (!file[0])) return false; if ((!lr) || (!file) || (!file[0])) return false;
if (!lr->infilename_buckets) return true; if (!lr->infilename_buckets) return true;

View file

@ -1148,7 +1148,7 @@ bool compress_file(rzip_control *control)
control->fd_out = fd_out; control->fd_out = fd_out;
if (!STDIN) if (!STDIN)
if (unlikely(!preserve_perms(control, fd_in, fd_out))) goto error; if (unlikely(!preserve_perms(control, fd_in, fd_out))) goto error;
} else } else
if (unlikely(!open_tmpoutbuf(control))) goto error; if (unlikely(!open_tmpoutbuf(control))) goto error;
/* Write zeroes to header at beginning of file */ /* Write zeroes to header at beginning of file */

2
rzip.c
View file

@ -725,7 +725,7 @@ static bool mmap_stdin(rzip_control *control, uchar *buf, struct rzip_state *st)
buf = (uchar *)mremap(buf, st->chunk_size, total, 0); buf = (uchar *)mremap(buf, st->chunk_size, total, 0);
st->mmap_size = st->chunk_size = total; st->mmap_size = st->chunk_size = total;
} else { } else {
/* Empty file */ /* Empty file */
buf = (uchar *)mremap(buf, st->chunk_size, control->page_size, 0); buf = (uchar *)mremap(buf, st->chunk_size, control->page_size, 0);
st->mmap_size = control->page_size; st->mmap_size = control->page_size;
st->chunk_size = 0; st->chunk_size = 0;

View file

@ -981,7 +981,7 @@ bool close_streamout_threads(rzip_control *control)
free(threads); free(threads);
return false; return false;
} }
if (++close_thread == control->threads) if (++close_thread == control->threads)
close_thread = 0; close_thread = 0;
} }
@ -1283,7 +1283,7 @@ static bool rewrite_encrypted(rzip_control *control, struct stream_info *sinfo,
if (unlikely(write_buf(control, head, SALT_LEN))) if (unlikely(write_buf(control, head, SALT_LEN)))
failure_goto(("Failed to write_buf head in rewrite_encrypted\n"), error); failure_goto(("Failed to write_buf head in rewrite_encrypted\n"), error);
if (unlikely(read_buf(control, sinfo->fd, buf, 25))) if (unlikely(read_buf(control, sinfo->fd, buf, 25)))
failure_goto(("Failed to read_buf buf in rewrite_encrypted\n"), error); failure_goto(("Failed to read_buf buf in rewrite_encrypted\n"), error);
if (unlikely(!lrz_encrypt(control, buf, 25, head))) goto error; if (unlikely(!lrz_encrypt(control, buf, 25, head))) goto error;
@ -1314,7 +1314,7 @@ static void *compthread(void *data)
int write_len; int write_len;
/* Make sure this thread doesn't already exist */ /* Make sure this thread doesn't already exist */
free(data); free(data);
cti = &cthread[i]; cti = &cthread[i];
ctis = cti->sinfo; ctis = cti->sinfo;
@ -1501,7 +1501,7 @@ static bool clear_buffer(rzip_control *control, struct stream_info *sinfo, int s
unlock_mutex(control, &cthread[i].mutex); unlock_mutex(control, &cthread[i].mutex);
return false; return false;
} }
if (newbuf) { if (newbuf) {
/* The stream buffer has been given to the thread, allocate a /* The stream buffer has been given to the thread, allocate a

2
util.c
View file

@ -365,7 +365,7 @@ bool lrz_crypt(const rzip_control *control, uchar *buf, i64 len, const uchar *sa
if (unlikely(aes_setkey_enc(&aes_ctx, key, 128))) if (unlikely(aes_setkey_enc(&aes_ctx, key, 128)))
failure_goto(("Failed to aes_setkey_enc in lrz_crypt\n"), error); failure_goto(("Failed to aes_setkey_enc in lrz_crypt\n"), error);
aes_crypt_cbc(&aes_ctx, AES_ENCRYPT, N, iv, buf, buf); aes_crypt_cbc(&aes_ctx, AES_ENCRYPT, N, iv, buf, buf);
if (M) { if (M) {
memset(tmp0, 0, CBC_LEN); memset(tmp0, 0, CBC_LEN);
memcpy(tmp0, buf + N, M); memcpy(tmp0, buf + N, M);