commit 12472189518006a105ca309e5443be98a646b8a1 from: Omar Polo date: Mon Feb 05 17:55:33 2024 UTC check explicitly for -1 commit - 609eaf39a9373e7f4e7e225a6a14c0819fa7271f commit + 12472189518006a105ca309e5443be98a646b8a1 blob - afd390f588ce3fca5237ef0c4d872d81ee9debce blob + 46f253b1358289bad78d5f37a60448b6014f50e0 --- tofu.c +++ tofu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022 Omar Polo + * Copyright (c) 2021, 2022, 2024 Omar Polo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -138,7 +138,7 @@ tofu_update_persist(struct ohash *h, struct tofu_entry return -1; } - if (rename(sfn, known_hosts_file)) + if (rename(sfn, known_hosts_file) == -1) return -1; return 0; }