diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2016-01-02 08:10:56 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2016-01-02 08:10:56 +0100 |
commit | 656279f5601c7d1fc9ff572000cd6b706bb46b7f (patch) | |
tree | b9596a665602c24b4c029a81f912649421040830 /src | |
parent | m fix (diff) | |
download | radharc-656279f5601c7d1fc9ff572000cd6b706bb46b7f.tar.gz radharc-656279f5601c7d1fc9ff572000cd6b706bb46b7f.tar.bz2 radharc-656279f5601c7d1fc9ff572000cd6b706bb46b7f.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/blackbody.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blackbody.c b/src/blackbody.c index 8bb5873..1e06fb9 100644 --- a/src/blackbody.c +++ b/src/blackbody.c @@ -125,13 +125,13 @@ get_colour(int fd, int temp, double *r, double *g, double *b) * unencodeable. */ if (temp > HIGHEST) temp = HIGHEST; /* Things do not glow below 1000 K. Yes, fire is hot! */ - if (temp < LOWEST) return EDOM, -1; + if (temp < LOWEST) return errno = EDOM, -1; /* Read table. */ offset = ((off_t)temp - LOWEST) / DELTA; offset *= (off_t)(5 * sizeof(double)); errno = 0; - if (pread(fd, values, sizeof(values), offset) < sizeof(values)) + if (pread(fd, values, sizeof(values), offset) < (ssize_t)sizeof(values)) return -1; /* Get colour. */ |