Merge "Nullability check for fts module" am: 5ae243b7f9 am: 382db17248

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2490968

Change-Id: I9cf00d46a450e21a083eada763ce52964beef440
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-03-30 20:04:03 +00:00 committed by Automerger Merge Worker
commit 04cf200c89

View file

@ -39,15 +39,15 @@
#include <sys/types.h>
typedef struct {
struct _ftsent *fts_cur; /* current node */
struct _ftsent *fts_child; /* linked list of children */
struct _ftsent **fts_array; /* sort array */
struct _ftsent * _Nullable fts_cur; /* current node */
struct _ftsent * _Nullable fts_child; /* linked list of children */
struct _ftsent * _Nullable * _Nullable fts_array; /* sort array */
dev_t fts_dev; /* starting device # */
char *fts_path; /* path for this descent */
char * _Nullable fts_path; /* path for this descent */
int fts_rfd; /* fd for root */
size_t fts_pathlen; /* sizeof(path) */
int fts_nitems; /* elements in the sort array */
int (*fts_compar)(); /* compare function */
int (* _Nullable fts_compar)(); /* compare function */
#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
#define FTS_LOGICAL 0x0002 /* logical walk */
@ -65,13 +65,13 @@ typedef struct {
} FTS;
typedef struct _ftsent {
struct _ftsent *fts_cycle; /* cycle node */
struct _ftsent *fts_parent; /* parent directory */
struct _ftsent *fts_link; /* next file in directory */
struct _ftsent * _Nullable fts_cycle; /* cycle node */
struct _ftsent * _Nullable fts_parent; /* parent directory */
struct _ftsent * _Nullable fts_link; /* next file in directory */
long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
void * _Nullable fts_pointer; /* local address value */
char * _Nullable fts_accpath; /* access path */
char * _Nullable fts_path; /* root path */
int fts_errno; /* errno for this node */
int fts_symfd; /* fd for symlink */
size_t fts_pathlen; /* strlen(fts_path) */
@ -111,7 +111,7 @@ typedef struct _ftsent {
#define FTS_SKIP 4 /* discard node */
unsigned short fts_instr; /* fts_set() instructions */
struct stat *fts_statp; /* stat(2) information */
struct stat * _Nullable fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
} FTSENT;
@ -122,11 +122,11 @@ __BEGIN_DECLS
* breakage in 21 that means you can't write code that runs on current devices and pre-21 devices,
* so we break the tie in favor of current and future devices.
*/
FTSENT* fts_children(FTS* __fts, int __options) __INTRODUCED_IN(21);
int fts_close(FTS* __fts) __INTRODUCED_IN(21);
FTS* fts_open(char* const* __path, int __options, int (*__comparator)(const FTSENT** __lhs, const FTSENT** __rhs)) __INTRODUCED_IN(21);
FTSENT* fts_read(FTS* __fts) __INTRODUCED_IN(21);
int fts_set(FTS* __fts, FTSENT* __entry, int __options) __INTRODUCED_IN(21);
FTSENT* _Nullable fts_children(FTS* _Nonnull __fts, int __options) __INTRODUCED_IN(21);
int fts_close(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
FTS* _Nullable fts_open(char* _Nonnull const* _Nonnull __path, int __options, int (* _Nullable __comparator)(const FTSENT* _Nonnull * _Nonnull __lhs, const FTSENT* _Nonnull * _Nonnull __rhs)) __INTRODUCED_IN(21);
FTSENT* _Nullable fts_read(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
int fts_set(FTS* _Nonnull __fts, FTSENT* _Nonnull __entry, int __options) __INTRODUCED_IN(21);
__END_DECLS