[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] libdiskfs: fix error handling
From: |
Justus Winter |
Subject: |
[PATCH 2/6] libdiskfs: fix error handling |
Date: |
Sat, 16 Nov 2013 10:58:15 +0100 |
Found using the Clang Static Analyzer.
* libdiskfs/dir-renamed.c (diskfs_rename_dir): Fix error handling.
---
libdiskfs/dir-renamed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index d73dc28..9b7ec3a 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -132,7 +132,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp,
const char *fromname,
if (tdp->dn_stat.st_nlink == diskfs_link_max - 1)
{
err = EMLINK;
- return EMLINK;
+ goto out;
}
tdp->dn_stat.st_nlink++;
tdp->dn_set_ctime = 1;
--
1.7.10.4
- Clang Static Analyzer reports & more fixes for the Hurd, Justus Winter, 2013/11/16
- [PATCH 1/6] libdiskfs: remove dead assignment, Justus Winter, 2013/11/16
- [PATCH 2/6] libdiskfs: fix error handling,
Justus Winter <=
- [PATCH 4/6] libshouldbeinlibc: fix dead assignment, Justus Winter, 2013/11/16
- [PATCH 3/6] ext2fs: fix error handling, Justus Winter, 2013/11/16
- [PATCH 6/6] mach-defpager: do not remove -Wall from CFLAGS, Justus Winter, 2013/11/16
- [PATCH 5/6] mach-defpager: fix the page offsets returned by pager_pages, Justus Winter, 2013/11/16
- Re: Clang Static Analyzer reports & more fixes for the Hurd, Samuel Thibault, 2013/11/16