First page Back Continue Last page Overview Graphics
Før assert
#include <string.h>
size_t q2_len(const char *s) {
const char *p = strchr(s,'q');
if(p)
p=strchr(p+1,'q');
if(!p)
p=strchr(s,'\0');
return p-s;
}
Genererer for return statement:
Warning 613: Possible use of null pointer 'p' in left argument to operator 'ptr-ptr'