Skip to content

Commit

Permalink
fs/9p: adjust sscanf parameters accordingly to the variable types
Browse files Browse the repository at this point in the history
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Toralf Förster authored and Eric Van Hensbergen committed Jun 1, 2014
1 parent c9eaa44 commit afe604d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses,
int major = -1, minor = -1;

strlcpy(ext, stat->extension, sizeof(ext));
sscanf(ext, "%c %u %u", &type, &major, &minor);
sscanf(ext, "%c %i %i", &type, &major, &minor);
switch (type) {
case 'c':
res |= S_IFCHR;
Expand Down

0 comments on commit afe604d

Please sign in to comment.