Lines Matching refs:strlen
1 .. title:: clang-tidy - bugprone-misplaced-operator-in-strlen-in-alloc
3 bugprone-misplaced-operator-in-strlen-in-alloc
6 Finds cases where ``1`` is added to the string in the argument to ``strlen()``,
13 ``strlen()``-like function are ignored, as are cases where the whole addition is
21 char *c = (char*) malloc(strlen(str + 1));
25 The suggested fix is to add ``1`` to the return value of ``strlen()`` and not
30 char *c = (char*) malloc(strlen(str) + 1);
38 char *c = new char[strlen(str + 1)];
43 add ``1`` to the return value of ``strlen()`` and not to its argument. In the
48 char *c = new char[strlen(str) + 1];
56 char *c = (char*) malloc(strlen((str + 1)));