diff options
| author | Roy Marples <roy@marples.name> | 2015-06-12 09:54:09 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-06-12 09:54:09 +0000 |
| commit | 32897869f1afd4bd2c6d943ee65d21492856048b (patch) | |
| tree | 03bb747eb543ff4ae3078c0ceb634765f066c41d /ipv6.c | |
| parent | a175f2b7dd90b2df00f78fef07d0d145101e2289 (diff) | |
| download | dhcpcd-32897869f1afd4bd2c6d943ee65d21492856048b.tar.xz | |
Check fclose(3) writes correctly, thanks to Bob.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -251,7 +251,8 @@ ipv6_readsecret(struct dhcpcd_ctx *ctx) goto eexit; x = fprintf(fp, "%s\n", hwaddr_ntoa(ctx->secret, ctx->secret_len, line, sizeof(line))); - fclose(fp); + if (fclose(fp) == EOF) + x = -1; if (x > 0) return (ssize_t)ctx->secret_len; |
