Fixes the coverity issue:
**
1395371 Argument cannot be negative
1. negative_return_fn: Function open(file, 578, 448) returs a negative number.
2. var_assign: Assigning: signed variable fd = open
**
1395427 Argument cannot be negative
1. negative_return_fn: Function open(file, 578, 448) returns a negative number.
2. var_assign: Assigning: signed variable fd = open
Signed-off-by: Amit Kumar <amitkuma@redhat.com>
const char *file = FILENAME;
::unlink(file);
int fd = ::open(file, O_CREAT|O_RDWR|O_TRUNC, 0700);
+ assert(fd >= 0);
std::size_t existing_xattrs = get_xattrs(fd).size();
char buf[800];
const char *file = FILENAME;
::unlink(file);
int fd = ::open(file, O_CREAT|O_RDWR|O_TRUNC, 0700);
+ assert(fd >= 0);
std::size_t existing_xattrs = get_xattrs(fd).size();
::close(fd);