Skip to content

Commit

Permalink
[S390] hypfs: Use "%u" instead of "%d" for unsigned ints in snprintf
Browse files Browse the repository at this point in the history
For printing unsigned integers hypfs uses "%d" in snprintf(). This is wrong.
With this patch "%u" is used instead.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Sep 11, 2009
1 parent 11af97e commit ad2a5d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ struct dentry *hypfs_create_u64(struct super_block *sb, struct dentry *dir,
char tmp[TMP_SIZE];
struct dentry *dentry;

snprintf(tmp, TMP_SIZE, "%lld\n", (unsigned long long int)value);
snprintf(tmp, TMP_SIZE, "%llu\n", (unsigned long long int)value);
buffer = kstrdup(tmp, GFP_KERNEL);
if (!buffer)
return ERR_PTR(-ENOMEM);
Expand Down

0 comments on commit ad2a5d8

Please sign in to comment.