summaryrefslogtreecommitdiffstats
path: root/source3/utils
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-26 20:16:26 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-04-02 09:03:43 +0200
commitb0d09ee39c7c35c727e320ecda50cf36e558b68b (patch)
tree8b208c16caa5d57aac61376d5b56d903ffaaeca6 /source3/utils
parentbba7f285f9a6b82a12f5159b8ce830fb40512494 (diff)
downloadsamba-b0d09ee39c7c35c727e320ecda50cf36e558b68b.tar.gz
samba-b0d09ee39c7c35c727e320ecda50cf36e558b68b.tar.xz
samba-b0d09ee39c7c35c727e320ecda50cf36e558b68b.zip
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>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbta-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/smbta-util.c b/source3/utils/smbta-util.c
index 6dfa0d524b..4c2accd130 100644
--- a/source3/utils/smbta-util.c
+++ b/source3/utils/smbta-util.c
@@ -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);