Fix "ignoring return value" complaints from commit 96d1f423f9

Joe Conway <mail@joeconway.com>

Commit: 1243aa9b2f2e8a23f5fbace2b038b962bf79e9f0
Author: Joe Conway <mail@joeconway.com>
Date: 2020-07-04T17:47:31Z
Releases: 11.9
Fix "ignoring return value" complaints from commit 96d1f423f9

The cfbot and some BF animals are complaining about the previous
read_binary_file commit because of ignoring return value of ‘fread’.
So let's make everyone happy by testing the return value even though
not strictly needed.

Reported by Justin Pryzby, and suggested patch by Tom Lane. Backpatched
to v11 same as the previous commit.

Reported-By: Justin Pryzby
Reviewed-By: Tom Lane
Discussion: https://postgr.es/m/flat/969b8d82-5bb2-5fa8-4eb1-f0e685c5d736%40joeconway.com
Backpatch-through: 11

Files

PathChange+/−
src/backend/utils/adt/genfile.c modified +1 −2

Discussion

Cited messages not in the archive: flat/969b8d82-5bb2-5fa8-4eb1-f0e685c5d736@joeconway.com