Fix naming inconsistencies: header guard, FieldName prefix, Operation typedef

This commit is contained in:
Fabio Scotto di Santolo
2026-08-25 23:54:31 +02:00
parent ad062794d8
commit a7f13e408b
5 changed files with 9 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ int list(const char *snapshot) {
}
int ret = RecordObjectUnpack(objp, buf);
if (field != NONE) {
fprintf(stderr, "%s:%d: invalid %s\n", snapshot, i + 1, FieldName(field));
fprintf(stderr, "%s:%d: invalid %s\n", snapshot, i + 1, RecordObjectFieldName(field));
rc = 128;
RecordObjectRelease(objp);
break;

View File

@@ -20,7 +20,7 @@ static const char *field_names[] = {
"file type", "permissions", "uid", "gid", "size",
"time", "target", "fingerprint", "path", "none"};
const char *FieldName(enum Fields f) {
const char *RecordObjectFieldName(enum Fields f) {
return (f <= NONE) ? field_names[f] : "unknown";
}

View File

@@ -18,7 +18,7 @@ static int ignore_file(const char *name) {
return 0;
}
static int handle_unknown(const char *path, operation op, void *context) {
static int handle_unknown(const char *path, WalkOp op, void *context) {
struct stat st;
if (lstat(path, &st) == -1) {
@@ -36,7 +36,7 @@ static int handle_unknown(const char *path, operation op, void *context) {
return 0;
}
int walk(const char *directory, operation op, void *context) {
int walk(const char *directory, WalkOp op, void *context) {
errno = 0;
DIR *dirp = opendir(directory);
if (dirp == NULL) {