mount.cifs: fix test for strtoul failure in mount.cifs
authorJeff Layton <jlayton@samba.org>
Fri, 15 Apr 2011 11:49:51 +0000 (07:49 -0400)
committerJeff Layton <jlayton@samba.org>
Fri, 15 Apr 2011 11:49:51 +0000 (07:49 -0400)
commit00e7fcbe9f519a8251707321eadd34cf156447e5
tree8cd13626dd3203267354f825d39e33f59d159efd
parentffac601c45b167a1af1d35561f1c01ab0813cc14
mount.cifs: fix test for strtoul failure in mount.cifs

It currently test to see if errno == -EINVAL and whether the endptr
is '\0'. That's not correct however. What we really want it to do is
check to see if any error occurred by setting errno to 0 before the
conversion. If one did, then try to treat the value as a name.

Also fix a bogus compiler warning about cruid being uninitialized.

Reported-by: Jian Li <jiali@redhat.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
mount.cifs.c