diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 08:06:22 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 08:06:22 +0000 |
commit | 81711ef8cd219acd030a873ec4452671daeaaa5a (patch) | |
tree | 32657fda476dda84901239f59aad51c9a3c3fc8d /libstore/argp.c | |
parent | 8a3e8261c7a4c8893cf66e30ce6f3a16d00490df (diff) | |
download | hurd-81711ef8cd219acd030a873ec4452671daeaaa5a.tar.gz hurd-81711ef8cd219acd030a873ec4452671daeaaa5a.tar.bz2 hurd-81711ef8cd219acd030a873ec4452671daeaaa5a.zip |
1999-07-11 Thomas Bushnell, BSG <tb@mit.edu>
* argp.c (store_parsed_open): Add more braces to clarify if-else
structure.
* encode.c: Include <sys/mman.h>
* zero.c: Likewise.
* encode.c (store_encode): Repair syntax.
* copy.c (copy_read): Likewise.
* enc.c (store_enc_dealloc): Cast first arg of munmap correctly.
Diffstat (limited to 'libstore/argp.c')
-rw-r--r-- | libstore/argp.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/libstore/argp.c b/libstore/argp.c index b7636b56..97640e19 100644 --- a/libstore/argp.c +++ b/libstore/argp.c @@ -1,6 +1,6 @@ /* Store argument parsing - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> This file is part of the GNU Hurd. @@ -171,18 +171,20 @@ store_parsed_open (const struct store_parsed *parsed, int flags, { const struct store_class *type = parsed->type; if (type->open) - if (parsed->name_prefix) - /* If there's a name prefix, we prefix any names we open with that - and a colon. */ - { - char pfxed_name[pfx_len + 1 + strlen (name) + 1]; - stpcpy (stpcpy (stpcpy (pfxed_name, parsed->name_prefix), - ":"), - name); - return (*type->open) (pfxed_name, flags, parsed->classes, store); - } - else - return (*type->open) (name, flags, parsed->classes, store); + { + if (parsed->name_prefix) + /* If there's a name prefix, we prefix any names we open with that + and a colon. */ + { + char pfxed_name[pfx_len + 1 + strlen (name) + 1]; + stpcpy (stpcpy (stpcpy (pfxed_name, parsed->name_prefix), + ":"), + name); + return (*type->open) (pfxed_name, flags, parsed->classes, store); + } + else + return (*type->open) (name, flags, parsed->classes, store); + } else return EOPNOTSUPP; } |