mirror of
https://github.com/facebookexperimental/reverie.git
synced 2025-01-23 13:10:04 +00:00
20c7020868
Summary: The OSS license linter doesn't like the word "its". Reviewed By: johnhurt Differential Revision: D36856385 fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
32 lines
645 B
C
32 lines
645 B
C
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
|
|
#define assert(b) \
|
|
if (!(b)) \
|
|
abort();
|
|
|
|
int main(int argc, char* argv[]) {
|
|
const char* file = "/etc/passwd";
|
|
int fd;
|
|
|
|
for (int i = 0; i < 1000; i++) {
|
|
fd = open(file, O_RDONLY);
|
|
assert(access(file, O_RDONLY) == 0);
|
|
assert(fd >= 0);
|
|
close(fd);
|
|
}
|
|
|
|
return 0;
|
|
}
|