A question in sdsIncrLen
オープン
- 主要言語
- C
- スター
- 5.6k
- フォーク
- 510
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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';
}
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。