diff options
author | Neil Brown <neilb@suse.de> | 2006-06-23 17:10:56 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-06-23 17:10:56 +1000 |
commit | 0523fd513c6baa8dbf45d1a7afea2044262aeb3d (patch) | |
tree | 124eade50a8f75cbb2bb8688aff958367a0f4b90 /support/misc | |
parent | 2e075a16da4963f54cd556403ca9e15a68de27fd (diff) | |
download | nfs-utils-0523fd513c6baa8dbf45d1a7afea2044262aeb3d.tar.gz nfs-utils-0523fd513c6baa8dbf45d1a7afea2044262aeb3d.tar.xz nfs-utils-0523fd513c6baa8dbf45d1a7afea2044262aeb3d.zip |
Further coverity related cleanups.
Greg Banks suggested some variations, particularly improved
use of xmalloc/xstrdup functions. Thanks.
Diffstat (limited to 'support/misc')
-rw-r--r-- | support/misc/mountpoint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c index 2cf1324..750b6e8 100644 --- a/support/misc/mountpoint.c +++ b/support/misc/mountpoint.c @@ -22,9 +22,8 @@ is_mountpoint(char *path) struct stat stb, pstb; int rv; - dotdot = malloc(strlen(path)+4); - if (!dotdot) - return 0; + dotdot = xmalloc(strlen(path)+4); + strcat(strcpy(dotdot, path), "/.."); if (lstat(path, &stb) != 0 || lstat(dotdot, &pstb) != 0) |