Re: [hackers] [ubase][PATCH 2/5] mount: Indent/align properly

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Mon, 11 Jul 2016 15:04:31 +0200

Hi Klemens,

> ---
> mount.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/mount.c b/mount.c
> index e70c7d1..1f17789 100644
> --- a/mount.c
> +++ b/mount.c
> _AT_@ -47,10 +47,9 @@ findtype(const char *types, const char *t)
> const char *p;
> size_t len;
>
> - for (len = strlen(t); (p = strstr(types, t)); types = p +
> len) {
> + for (len = strlen(t); (p = strstr(types, t)); types = p +
> len) if (!strncmp(p, t, len) && (p[len] == '\0' || p[len] == ','))
> return (char *)p;
> - }
> return NULL;
> }
Nope

> _AT_@ -247,9 +246,9 @@ main(int argc, char *argv[])
> }
> while ((me = getmntent(fp))) {
> if (strcmp(me->mnt_dir, target) == 0 ||
> - strcmp(me->mnt_fsname, target) == 0 ||
> - (source && strcmp(me->mnt_dir, source) ==
> 0) ||
> - (source && strcmp(me->mnt_fsname, source)
> == 0)) {
> + strcmp(me->mnt_fsname, target) == 0 ||
> + (source && strcmp(me->mnt_dir, source)
> == 0) ||
> + (source && strcmp(me->mnt_fsname,
> source) == 0)) { if (!source) {
> target = me->mnt_dir;
> source = me->mnt_fsname;
Yep

> _AT_@ -301,7 +300,7 @@ mountall:
> * if match and prefixed with "no", skip */
> if (types &&
> ((types[0] == 'n' && types[1] == 'o' &&
> - findtype(types + 2, me->mnt_type)) ||
> + findtype(types + 2, me->mnt_type)) ||
> (!findtype(types, me->mnt_type))))
> continue;
Nope
Received on Mon Jul 11 2016 - 15:04:31 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 11 2016 - 15:12:17 CEST