diff options
Diffstat (limited to 'fs/devpts')
-rw-r--r-- | fs/devpts/inode.c | 2 | ||||
-rw-r--r-- | fs/devpts/root.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index bad4281ff..b11cae5ba 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -348,7 +348,7 @@ void devpts_pty_kill(int number) } } -__initfunc(int init_devpts_fs(void)) +int __init init_devpts_fs(void) { return register_filesystem(&devpts_fs_type); diff --git a/fs/devpts/root.c b/fs/devpts/root.c index 9b5408235..5b5948e80 100644 --- a/fs/devpts/root.c +++ b/fs/devpts/root.c @@ -152,10 +152,9 @@ static struct dentry *devpts_root_lookup(struct inode * dir, struct dentry * den unsigned int nentry = *p++ - '0'; if ( nentry > 9 ) return NULL; - nentry += entry * 10; - if (nentry < entry) + if ( entry >= ~0U/10 ) return NULL; - entry = nentry; + entry = nentry + entry * 10; } } |