Orangefs: address problems found by static checker
authorMike Marshall <hubcap@omnibond.com>
Wed, 29 Jul 2015 17:36:37 +0000 (13:36 -0400)
committerMike Marshall <hubcap@omnibond.com>
Sat, 3 Oct 2015 15:40:03 +0000 (11:40 -0400)
commiteeaa3d448c5d35ad0dc16a981aacd64139c53eee
tree113bc05b053812e48a281bfb015b25958fa697e6
parent84d02150dea7571dc32176e35d65eecde82631a9
Orangefs: address problems found by static checker

  Don't check for negative rc from boolean.

  Don't pointlessly initialize variables, it short-circuits
  gcc's uninitialized variable warnings. And max_new_nr_segs
  can never be zero, so don't check for it.

  Preserve original kstrdup pointer for freeing later.

  Don't check for negative value in unsigned variable.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/dir.c
fs/orangefs/file.c
fs/orangefs/pvfs2-utils.c
fs/orangefs/xattr.c