You could as readily have this be a const int set at compile-time to sizeof(buffer0) - 1.