c
if (sp->bytes_per_line == 0) {
    // handle error or return early
    return -1; // or some other error code
}
if (cc % sp->bytes_per_line != 0) {
    // code here
}
