[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 36/87: ftpfs: fix error handling in refresh_dir
From: |
Samuel Thibault |
Subject: |
[hurd] 36/87: ftpfs: fix error handling in refresh_dir |
Date: |
Sun, 09 Nov 2014 11:05:02 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit b5a6e598c9f596f13d6aec151ee2efb9bf696b21
Author: Justus Winter <address@hidden>
Date: Wed Nov 20 11:58:41 2013 +0100
ftpfs: fix error handling in refresh_dir
Found using the Clang Static Analyzer.
* ftpfs/dir.c (refresh_dir): Fix error handling.
---
ftpfs/dir.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/ftpfs/dir.c b/ftpfs/dir.c
index da5ddbe..a9fea22 100644
--- a/ftpfs/dir.c
+++ b/ftpfs/dir.c
@@ -384,14 +384,18 @@ refresh_dir (struct ftpfs_dir *dir, int update_stats,
time_t timestamp,
if (! err)
err = update_ordered_name ("..", &dfs);
- /* Refetch the directory from the server. */
- if (update_stats)
- /* Fetch both names and stat info. */
- err = ftp_conn_get_stats (conn, dir->rmt_path, 1,
- update_ordered_entry, &dfs);
- else
- /* Just fetch names. */
- err = ftp_conn_get_names (conn, dir->rmt_path, update_ordered_name, &dfs);
+ if (! err)
+ {
+ /* Refetch the directory from the server. */
+ if (update_stats)
+ /* Fetch both names and stat info. */
+ err = ftp_conn_get_stats (conn, dir->rmt_path, 1,
+ update_ordered_entry, &dfs);
+ else
+ /* Just fetch names. */
+ err = ftp_conn_get_names (conn, dir->rmt_path,
+ update_ordered_name, &dfs);
+ }
if (! err)
/* GC any directory entries that weren't seen this time. */
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (55dd7de -> e4a9a4d), Samuel Thibault, 2014/11/09
- [hurd] 15/87: tmpfs: use a thread timeout, Samuel Thibault, 2014/11/09
- [hurd] 19/87: libdiskfs: use correct type for disk offsets, Samuel Thibault, 2014/11/09
- [hurd] 26/87: Merge the random translator into the Hurd repository, Samuel Thibault, 2014/11/09
- [hurd] 22/87: ext2fs: use size_t where appropriate, Samuel Thibault, 2014/11/09
- [hurd] 14/87: Merge branch 'random' of ssh://git.savannah.gnu.org/srv/git/hurd/incubator into random, Samuel Thibault, 2014/11/09
- [hurd] 28/87: term: improve the demuxer, Samuel Thibault, 2014/11/09
- [hurd] 27/87: Add the random translator to prog-subdirs, Samuel Thibault, 2014/11/09
- [hurd] 33/87: Merge procfs into the Hurd repository, Samuel Thibault, 2014/11/09
- [hurd] 34/87: Add the procfs translator to prog-subdirs, Samuel Thibault, 2014/11/09
- [hurd] 36/87: ftpfs: fix error handling in refresh_dir,
Samuel Thibault <=
- [hurd] 29/87: hurd: fix receiver lookup in termctty_open_terminal, Samuel Thibault, 2014/11/09
- [hurd] 35/87: Add mach_debug defs rules, Samuel Thibault, 2014/11/09
- [hurd] 37/87: libshouldbeinlibc: fix dead initialization in fmt_named_interval, Samuel Thibault, 2014/11/09
- [hurd] 32/87: Prepare the procfs translator to be merged into the Hurd sources, Samuel Thibault, 2014/11/09
- [hurd] 38/87: trans/fakeroot: fix error handling, Samuel Thibault, 2014/11/09
- [hurd] 39/87: libports: avoid realloc(3) corner case, Samuel Thibault, 2014/11/09
- [hurd] 40/87: libdiskfs: add permission check to file_chflags, Samuel Thibault, 2014/11/09
- [hurd] 31/87: Merge branch 'merge-random', Samuel Thibault, 2014/11/09
- [hurd] 41/87: libdiskfs: expose the ST_NOATIME flag, Samuel Thibault, 2014/11/09
- [hurd] 43/87: ext2fs: use correct type for block numbers, Samuel Thibault, 2014/11/09