[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 35/98: libshouldbeinlibc: fix error handling in maptime_map
From: |
Samuel Thibault |
Subject: |
[hurd] 35/98: libshouldbeinlibc: fix error handling in maptime_map |
Date: |
Tue, 14 Jan 2014 02:00:00 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 5e3d2fc37be8b73a0ddabf1389c75f79e77c7e93
Author: Justus Winter <address@hidden>
Date: Wed Nov 20 13:19:36 2013 +0100
libshouldbeinlibc: fix error handling in maptime_map
Found using the Clang Static Analyzer.
* libshouldbeinlibc/maptime.c (maptime_map): Fix error handling.
---
libshouldbeinlibc/maptime.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/libshouldbeinlibc/maptime.c b/libshouldbeinlibc/maptime.c
index 971e05f..ca35c6c 100644
--- a/libshouldbeinlibc/maptime.c
+++ b/libshouldbeinlibc/maptime.c
@@ -42,13 +42,13 @@ maptime_map (int use_mach_dev, char *dev_name,
mach_port_t device_master;
err = get_privileged_ports (0, &device_master);
- if (! err)
- {
- err = device_open (device_master, 0, dev_name ?: "time", &device);
- mach_port_deallocate (mach_task_self (), device_master);
- if (err)
- return err;
- }
+ if (err)
+ return err;
+
+ err = device_open (device_master, 0, dev_name ?: "time", &device);
+ mach_port_deallocate (mach_task_self (), device_master);
+ if (err)
+ return err;
err = device_map (device, VM_PROT_READ, 0, sizeof *mtime, &memobj, 0);
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (90b039d -> 5aa7b58), Samuel Thibault, 2014/01/13
- [hurd] 22/98: mach-defpager: fix the page offsets returned by pager_pages, Samuel Thibault, 2014/01/13
- [hurd] 28/98: utils: fix dead initialization, Samuel Thibault, 2014/01/13
- [hurd] 29/98: libps: fix the length computation in fprint_frac_value, Samuel Thibault, 2014/01/13
- [hurd] 27/98: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/01/13
- [hurd] 35/98: libshouldbeinlibc: fix error handling in maptime_map,
Samuel Thibault <=
- [hurd] 25/98: libports: implement lockless management of threads, Samuel Thibault, 2014/01/13
- [hurd] 33/98: usermux: actually use the computed flags value in netfs_attempt_utimes, Samuel Thibault, 2014/01/13
- [hurd] 32/98: nfsd: fix error handling in op_remove, Samuel Thibault, 2014/01/13
- [hurd] 30/98: fatfs: fix error handling in diskfs_lookup_hard, Samuel Thibault, 2014/01/13
- [hurd] 42/98: libports: improve error handling in ports_transfer_right, Samuel Thibault, 2014/01/13
- [hurd] 43/98: libdiskfs: improve error reporting in diskfs_start_disk_pager, Samuel Thibault, 2014/01/13
- [hurd] 44/98: libports: improve error reporting in adjust_priority, Samuel Thibault, 2014/01/13
- [hurd] 47/98: libfshelp: improve error handling in fshelp_start_translator_long, Samuel Thibault, 2014/01/13
- [hurd] 46/98: proc: store the device master port in _hurd_device_master, Samuel Thibault, 2014/01/13
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, Samuel Thibault, 2014/01/13