A question in sdsIncrLen
Abierto
- Lenguaje dominante
- C
- Estrellas
- 5.6k
- Forks
- 510
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
In the function sdsIncrLen, I think the statement "assert(sh->free >= 0) " is redundant, because "assert(sh->free >= incr)" makes sure this situation would not happen.
void sdsIncrLen(sds s, int incr) {
struct sdshdr _sh = (void_)(s - sizeof *sh);
assert(sh->free >= incr);
sh->len += incr;
sh->free -= incr;
assert(sh->free >= 0);
s[sh->len] = '\0';
}
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.