Commit 4b47a8b5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Tyler Hicks
Browse files

ecryptfs: re-order a condition for static checkers



Static checkers complain that we are using "s->i" as an offset before
we check whether it is within bounds.  It doesn't matter much but we
can easily swap the order of the checks to make everyone happy.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
parent 0bdf8a82
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1063,8 +1063,9 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size,
		       "rc = [%d]\n", __func__, rc);
		goto out_free_unlock;
	}
	while (s->decrypted_filename[s->i] != '\0'
	       && s->i < s->block_aligned_filename_size)

	while (s->i < s->block_aligned_filename_size &&
	       s->decrypted_filename[s->i] != '\0')
		s->i++;
	if (s->i == s->block_aligned_filename_size) {
		printk(KERN_WARNING "%s: Invalid tag 70 packet; could not "