mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
Don't exit(0) on error
This commit is contained in:
parent
a0e2632e11
commit
9447f863d2
@ -56,7 +56,7 @@ static void create_keyfile(char *filename, char *key)
|
||||
keyfile = fopen(filename, "w");
|
||||
if (keyfile == NULL) {
|
||||
printf("error creating the keyfile!\n");
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
fprintf(keyfile, "%s", key);
|
||||
fclose(keyfile);
|
||||
@ -75,13 +75,13 @@ static char *load_key_from_file(char *filename)
|
||||
keyfile = fopen(filename, "r");
|
||||
if (keyfile == NULL) {
|
||||
printf("Error opening the keyfile!\n");
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
l = fscanf(keyfile, "%s", key);
|
||||
if (strlen(key) != 16) {
|
||||
printf("Key file in wrong format\n");
|
||||
fclose(keyfile);
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user