diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-02-16 15:18:09 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-02-16 15:18:09 +0000 |
commit | cabdd1c9c253720e60f1881bea545dd0a493a967 (patch) | |
tree | faf9cf3e21dffff92ec6dc963fa883c978e20663 /usr.sbin/rpki-client/mft.c | |
parent | 4f4a2762a12a85843145f2e1c8a41f70143aa8ee (diff) |
Rename fn into file to avoid clash in upcoming diff
ok job
Diffstat (limited to 'usr.sbin/rpki-client/mft.c')
-rw-r--r-- | usr.sbin/rpki-client/mft.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/rpki-client/mft.c b/usr.sbin/rpki-client/mft.c index 159cc519954..59285ca336f 100644 --- a/usr.sbin/rpki-client/mft.c +++ b/usr.sbin/rpki-client/mft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mft.c,v 1.109 2024/02/16 15:13:49 tb Exp $ */ +/* $OpenBSD: mft.c,v 1.110 2024/02/16 15:18:08 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -185,7 +185,7 @@ rtype_from_mftfile(const char *fn) static int mft_parse_filehash(struct parse *p, const FileAndHash *fh) { - char *fn = NULL; + char *file = NULL; int rc = 0; struct mftfile *fent; enum rtype type; @@ -195,8 +195,8 @@ mft_parse_filehash(struct parse *p, const FileAndHash *fh) warnx("%s: RFC 6486 section 4.2.2: bad filename", p->fn); goto out; } - fn = strndup(fh->file->data, fh->file->length); - if (fn == NULL) + file = strndup(fh->file->data, fh->file->length); + if (file == NULL) err(1, NULL); if (fh->hash->length != SHA256_DIGEST_LENGTH) { @@ -206,9 +206,9 @@ mft_parse_filehash(struct parse *p, const FileAndHash *fh) goto out; } - type = rtype_from_mftfile(fn); + type = rtype_from_mftfile(file); /* remember the filehash for the CRL in struct mft */ - if (type == RTYPE_CRL && strcmp(fn, p->res->crl) == 0) { + if (type == RTYPE_CRL && strcmp(file, p->res->crl) == 0) { memcpy(p->res->crlhash, fh->hash->data, SHA256_DIGEST_LENGTH); p->found_crl = 1; } @@ -223,13 +223,13 @@ mft_parse_filehash(struct parse *p, const FileAndHash *fh) } fent->type = type; - fent->file = fn; - fn = NULL; + fent->file = file; + file = NULL; memcpy(fent->hash, fh->hash->data, SHA256_DIGEST_LENGTH); rc = 1; out: - free(fn); + free(file); return rc; } |