ieee1394: forgotten dereference...
authorAl Viro <[email protected]>
Sun, 15 Jul 2007 19:59:51 +0000 (20:59 +0100)
committerLinus Torvalds <[email protected]>
Sun, 15 Jul 2007 23:40:51 +0000 (16:40 -0700)
Going through the string and waiting for _pointer_ to become '\0'
is not what the authors meant...

Signed-off-by: Al Viro <[email protected]>
Acked-by: Ben Collins <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/ieee1394/nodemgr.c

index c4d3d4131f01728725496526687de8a55906bc20..51a12062ed368726530dd60b9fbbe43469ec8f4b 100644 (file)
@@ -283,7 +283,7 @@ static ssize_t fw_show_##class##_##td_kv (struct device *dev, struct device_attr
        memcpy(buf,                                                     \
               CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(class->td_kv),      \
               len);                                                    \
-       while ((buf + len - 1) == '\0')                                 \
+       while (buf[len - 1] == '\0')                                    \
                len--;                                                  \
        buf[len++] = '\n';                                              \
        buf[len] = '\0';                                                \