refactor: change char_u to uint8_t or char in sha256.c/undo.c (#21914)

Use uint8_t for bytes in hashes as it doesn't make sense for them to be signed.
This commit is contained in:
zeertzjq
2023-01-21 08:58:57 +08:00
committed by GitHub
parent efe5ce6fa8
commit 1c16d0994d
5 changed files with 44 additions and 44 deletions

View File

@@ -5972,18 +5972,18 @@ static void ex_undo(exarg_T *eap)
static void ex_wundo(exarg_T *eap)
{
char hash[UNDO_HASH_SIZE];
uint8_t hash[UNDO_HASH_SIZE];
u_compute_hash(curbuf, (char_u *)hash);
u_write_undo(eap->arg, eap->forceit, curbuf, (char_u *)hash);
u_compute_hash(curbuf, hash);
u_write_undo(eap->arg, eap->forceit, curbuf, hash);
}
static void ex_rundo(exarg_T *eap)
{
char hash[UNDO_HASH_SIZE];
uint8_t hash[UNDO_HASH_SIZE];
u_compute_hash(curbuf, (char_u *)hash);
u_read_undo(eap->arg, (char_u *)hash, NULL);
u_compute_hash(curbuf, hash);
u_read_undo(eap->arg, hash, NULL);
}
/// ":redo".