diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/DHT_bootstrap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index b715181a..0e95805d 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -146,8 +146,13 @@ int main(int argc, char *argv[]) | |||
146 | 146 | ||
147 | #endif | 147 | #endif |
148 | 148 | ||
149 | FILE *file; | 149 | const char *const public_id_filename = "PUBLIC_ID.txt"; |
150 | file = fopen("PUBLIC_ID.txt", "w"); | 150 | FILE *file = fopen(public_id_filename, "w"); |
151 | |||
152 | if (file == NULL) { | ||
153 | printf("Could not open file \"%s\" for writing. Exiting...\n", public_id_filename); | ||
154 | exit(1); | ||
155 | } | ||
151 | 156 | ||
152 | for (i = 0; i < 32; i++) { | 157 | for (i = 0; i < 32; i++) { |
153 | printf("%02hhX", dht->self_public_key[i]); | 158 | printf("%02hhX", dht->self_public_key[i]); |