Re: [patch -mm] mm, mempolicy: silence gcc warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
>> index 9fe426b..eee0597 100644
>> --- a/include/linux/mempolicy.h
>> +++ b/include/linux/mempolicy.h
>> @@ -309,6 +309,8 @@ static inline int mpol_parse_str(char *str, struct mempolicy **mpol)
>>
>>  static inline void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
>>  {
>> +     strncpy(buffer, "default", maxlen-1);
>> +     buffer[maxlen-1] = '\0';
>>  }
>>
>
> Well, as David said, BUILD_BUG() would be the preferred cleanup.  I'll
> stick one in there and see what the build bot has to say?

Sigh, I can't understand why you always prefer to increase maintenance annoying.
However up to you.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]