1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3:utils: explicitly check the return value of fscanf() to avoid unused warnings in smbta-util.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-02-26 20:16:26 +01:00 committed by Andrew Bartlett
parent bba7f285f9
commit b0d09ee39c

View File

@ -78,7 +78,7 @@ static void load_key_from_file(char *filename, char *key)
exit(1);
}
l = fscanf(keyfile, "%s", key);
if (strlen(key) != 16) {
if (l != 1 || strlen(key) != 16) {
printf("Key file in wrong format\n");
fclose(keyfile);
exit(1);