diff options
author | Lionel Landwerlin <[email protected]> | 2017-05-08 18:47:06 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-05-09 13:54:08 +0100 |
commit | 4201b7d1bf4f3358c944065dd79c07fbdf561dbb (patch) | |
tree | 111192240440c0f7e522d48483c0dfb83bdbd595 | |
parent | bac80635af061ee4b6cb681c6ccf75cd174408d6 (diff) |
intel: gen decoder: don't check for size_t negative values
We should get either 0 or 1 here.
CID: 1373562 (Control flow issues)
Signed-off-by: Lionel Landwerlin <[email protected]>
Acked-by: Matt Turner <[email protected]>
-rw-r--r-- | src/intel/common/gen_decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 15bba3274ed..24147340f58 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -648,7 +648,7 @@ gen_spec_load_from_path(const struct gen_device_info *devinfo, do { buf = XML_GetBuffer(ctx.parser, XML_BUFFER_SIZE); len = fread(buf, 1, XML_BUFFER_SIZE, input); - if (len < 0) { + if (len == 0) { fprintf(stderr, "fread: %m\n"); fclose(input); free(filename); |