lkml.org 
[lkml]   [1998]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: joliet
    From
    Date
    Ulf Carlsson <grim@zigzegv.ml.org> writes:

    > an ops either. I thought it was quite confusing to do '*value++ = 0'. I
    > can't see why this shouldn't be replaced by a simple 'value++' since the
    > '=' 'value' points to will never be used anyway.


    isocharset=stuff
    ^ ^
    this_char |
    |
    value


    Not putting a zero at *value will cause the following strcmp() to
    never return zero, should an argument actually be provided. Therefore
    your patch removes a bug when no argument is given but causes it to
    not actually read the argument when one is there. I would leave out
    the first change and keep the second.

    Or so I guess... I haven't seen other parts of the code than your
    patch. :-).

    >
    > --- fs/isofs/inode.c-orig Thu Sep 10 15:36:55 1998
    > +++ fs/isofs/inode.c Thu Sep 10 16:40:57 1998
    > @@ -341,10 +341,10 @@
    > continue;
    > }
    > if ((value = strchr(this_char,'=')) != NULL)
    > - *value++ = 0;
    > + value++;
    >
    > #ifdef CONFIG_JOLIET
    > - if (!strcmp(this_char,"iocharset")) {
    > + if (!strcmp(this_char,"iocharset") && value) {
    > popt->iocharset = value;
    > while (*value && *value != ',')
    > value++;

    --
    Regards, Anders
    (address is valid)

    Civilization Law #1:
    Civilization advances by extending the number of important operations
    one can do without thinking about them.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/faq.html

    \
     
     \ /
      Last update: 2005-03-22 13:44    [W:0.024 / U:238.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site