Style: Don't check for entry being non-NULL (none
of the archive_entry routines do this); adjust some indentation to match the other code.
This commit is contained in:
1 parent
53d9c0ff19
commit
22d76265e4
1 file changed
+13
-17
+13
-17
@@ -701,19 +701,19 @@ _archive_entry_uname_l(struct archive_entry *entry,
|
||||
int
|
||||
archive_entry_is_data_encrypted(struct archive_entry *entry)
|
||||
{
|
||||
return (entry && (entry->encryption & AE_ENCRYPTION_DATA) == AE_ENCRYPTION_DATA);
|
||||
return ((entry->encryption & AE_ENCRYPTION_DATA) == AE_ENCRYPTION_DATA);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_is_metadata_encrypted(struct archive_entry *entry)
|
||||
{
|
||||
return (entry && (entry->encryption & AE_ENCRYPTION_METADATA) == AE_ENCRYPTION_METADATA);
|
||||
return ((entry->encryption & AE_ENCRYPTION_METADATA) == AE_ENCRYPTION_METADATA);
|
||||
}
|
||||
|
||||
int
|
||||
archive_entry_is_encrypted(struct archive_entry *entry)
|
||||
{
|
||||
return (entry && entry->encryption & (AE_ENCRYPTION_DATA|AE_ENCRYPTION_METADATA));
|
||||
return (entry->encryption & (AE_ENCRYPTION_DATA|AE_ENCRYPTION_METADATA));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1240,25 +1240,21 @@ archive_entry_update_uname_utf8(struct archive_entry *entry, const char *name)
|
||||
void
|
||||
archive_entry_set_is_data_encrypted(struct archive_entry *entry, char is_encrypted)
|
||||
{
|
||||
if (entry) {
|
||||
if (is_encrypted) {
|
||||
entry->encryption |= AE_ENCRYPTION_DATA;
|
||||
} else {
|
||||
entry->encryption &= ~AE_ENCRYPTION_DATA;
|
||||
}
|
||||
}
|
||||
if (is_encrypted) {
|
||||
entry->encryption |= AE_ENCRYPTION_DATA;
|
||||
} else {
|
||||
entry->encryption &= ~AE_ENCRYPTION_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
archive_entry_set_is_metadata_encrypted(struct archive_entry *entry, char is_encrypted)
|
||||
{
|
||||
if (entry) {
|
||||
if (is_encrypted) {
|
||||
entry->encryption |= AE_ENCRYPTION_METADATA;
|
||||
} else {
|
||||
entry->encryption &= ~AE_ENCRYPTION_METADATA;
|
||||
}
|
||||
}
|
||||
if (is_encrypted) {
|
||||
entry->encryption |= AE_ENCRYPTION_METADATA;
|
||||
} else {
|
||||
entry->encryption &= ~AE_ENCRYPTION_METADATA;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in new issue
Block a user