Re: Suggestion on "int len" sanity

From: Jörn Engel
Date: Thu Jun 02 2005 - 04:48:51 EST


On Thu, 2 June 2005 11:12:13 +0200, XIAO Gang wrote:
> >
> I know; I might try to do something later. The question here is to find
> the best balancing point between what
> are better replaced and what are not. I would hesitate a lot before
> doing things as below which are more likely to introduce new bugs than
> to avoid old ones.

In some cases a comment like "this sucks, but we have to do it
because.." helps. Example 2 can also be changed to size_t, that one
makes sense.

"grep 'int len'" really is a decent code checker, I agree. The hard
part is finding the 2% real problems among the output. And possibly
other cases where s/int/size_t/ doesn't fix anything, but makes
slightly more sense.

Jörn

--
Man darf nicht das, was uns unwahrscheinlich und unnatürlich erscheint,
mit dem verwechseln, was absolut unmöglich ist.
-- Carl Friedrich Gauß
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/