[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map |
Date: |
Thu, 21 Nov 2013 00:00:28 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Wed 20 Nov 2013 14:38:05 +0100, a écrit :
> Found using the Clang Static Analyzer.
>
> * libshouldbeinlibc/maptime.c (maptime_map): Fix error handling.
Ack
> ---
> 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);
> }
> --
> 1.7.10.4
>
--
Samuel
There are two types of Linux developers - those who can spell, and
those who can't. There is a constant pitched battle between the two.
(From one of the post-1.1.54 kernel update messages posted to c.o.l.a)
- Re: [PATCH 05/12] fatfs: fix error handling in diskfs_lookup_hard, (continued)
- [PATCH 04/12] libnetfs: fix a dead store, Justus Winter, 2013/11/20
- [PATCH 03/12] libps: fix the length computation in fprint_frac_value, Justus Winter, 2013/11/20
- [PATCH 06/12] fatfs: fix error handling in diskfs_get_directs, Justus Winter, 2013/11/20
- [PATCH 07/12] ftpfs: fix error handling in refresh_dir, Justus Winter, 2013/11/20
- [PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map, Justus Winter, 2013/11/20
- Re: [PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map,
Samuel Thibault <=
- [PATCH 09/12] usermux: actually use the computed flags value in netfs_attempt_utimes, Justus Winter, 2013/11/20
- [PATCH 08/12] nfsd: fix error handling in op_remove, Justus Winter, 2013/11/20
- [PATCH 10/12] libshouldbeinlibc: fix dead initialization in fmt_named_interval, Justus Winter, 2013/11/20
- [PATCH 11/12] mach-defpager: drop all register qualifiers, Justus Winter, 2013/11/20