We only use the string "?rwxrwxrwx " once, so inline it rather than
declaring a variable which points to it. Aside from eliminating a line of code and one level of unnecessary indirection, this eliminates a false positive in Coverity.
This commit is contained in:
parent
51062e592a
commit
ca42a8e225
@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
|
||||
const char *
|
||||
archive_entry_strmode(struct archive_entry *entry)
|
||||
{
|
||||
static const char *perms = "?rwxrwxrwx ";
|
||||
static const mode_t permbits[] =
|
||||
{ 0400, 0200, 0100, 0040, 0020, 0010, 0004, 0002, 0001 };
|
||||
char *bp = entry->strmode;
|
||||
@ -47,7 +46,7 @@ archive_entry_strmode(struct archive_entry *entry)
|
||||
int i;
|
||||
|
||||
/* Fill in a default string, then selectively override. */
|
||||
strcpy(bp, perms);
|
||||
strcpy(bp, "?rwxrwxrwx ");
|
||||
|
||||
mode = archive_entry_mode(entry);
|
||||
switch (archive_entry_filetype(entry)) {
|
||||
|
Loading…
Reference in New Issue
Block a user