On Fri, 14 Dec 2007 17:26:08 +1100 NeilBrown <[EMAIL PROTECTED]> wrote:

> +     if (strncmp(buf, "external:", 9) == 0) {
> +             int namelen = len-9;
> +             if (namelen >= sizeof(mddev->metadata_type))
> +                     namelen = sizeof(mddev->metadata_type)-1;
> +             strncpy(mddev->metadata_type, buf+9, namelen);
> +             mddev->metadata_type[namelen] = 0;
> +             if (namelen && mddev->metadata_type[namelen-1] == '\n')
> +                     mddev->metadata_type[--namelen] = 0;
> +             mddev->persistent = 0;
> +             mddev->external = 1;

size_t would be a more appropriate type for `namelen'.
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to