summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 18:50:55 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 18:50:55 -0400
commitefe17de3a254ed932cd2c8f2d79fca42ec375ba6 (patch)
treec0cda88ad1e2e77fb3bbdabd0b476eb72a98848c
parenta8b3f6260b1fa5636a77d19441d966d27850cab9 (diff)
downloadrandom-seed-efe17de3a254ed932cd2c8f2d79fca42ec375ba6.tar.xz
random-seed-efe17de3a254ed932cd2c8f2d79fca42ec375ba6.zip
Fix getdelim usage error
-rw-r--r--random-seed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random-seed.c b/random-seed.c
index 280e876..defcd5f 100644
--- a/random-seed.c
+++ b/random-seed.c
@@ -76,7 +76,7 @@ static bool get_machine_id(unsigned char **machine_id) {
}
size_t machine_id_len = 0;
- if (getdelim((char **)machine_id, &machine_id_len, '\0', machine_id_file) != -1) {
+ if (getdelim((char **)machine_id, &machine_id_len, '\0', machine_id_file) == -1) {
fputs("error reading machine id file\n", stderr);
*machine_id = NULL;
return false;