diff options
author | Daiki Ueno <ueno@gnu.org> | 2020-05-30 11:06:57 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2020-05-30 11:10:12 +0200 |
commit | 14e2203ce5d7a6bbe050861a1206873a040674e3 (patch) | |
tree | 11e6dc0698f3d4840dc01c2c537064acf79ad685 /src/serv.c | |
parent | 1976600876a3f0724b52c61d96998560dc4c0acb (diff) | |
download | gnutls-tmp-fileio.tar.gz |
build: write "FILE *fp" instead of "FILE *fd"tmp-fileio
This makes it clear that "fd" is not a file descriptor but a FILE
pointer. Suggested by Tim Rühsen.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'src/serv.c')
-rw-r--r-- | src/serv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/serv.c b/src/serv.c index 414cd0546b..57304bc9d3 100644 --- a/src/serv.c +++ b/src/serv.c @@ -219,7 +219,7 @@ static void read_dh_params(void) char tmpdata[2048]; int size; gnutls_datum_t params; - FILE *fd; + FILE *fp; if (gnutls_dh_params_init(&dh_params) < 0) { fprintf(stderr, "Error in dh parameter initialization\n"); @@ -228,15 +228,15 @@ static void read_dh_params(void) /* read the params file */ - fd = fopen(dh_params_file, "r"); - if (fd == NULL) { + fp = fopen(dh_params_file, "r"); + if (fp == NULL) { fprintf(stderr, "Could not open %s\n", dh_params_file); exit(1); } - size = fread(tmpdata, 1, sizeof(tmpdata) - 1, fd); + size = fread(tmpdata, 1, sizeof(tmpdata) - 1, fp); tmpdata[size] = 0; - fclose(fd); + fclose(fp); params.data = (unsigned char *) tmpdata; params.size = size; |