1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 10:46:45 +02:00

fix a bunch of implicit declarations

This commit is contained in:
Jfreegman
2014-06-21 21:41:38 -04:00
parent 6b9ef7e6c9
commit 34bd4a1c7c
16 changed files with 32 additions and 5 deletions

View File

@ -47,7 +47,7 @@ void add_char_to_buf(ChatContext *ctx, wint_t ch)
/* Deletes the character before pos */
void del_char_buf_bck(ChatContext *ctx)
{
if (ctx->pos <= 0)
if (ctx->pos == 0)
return;
wmemmove(&ctx->line[ctx->pos - 1], &ctx->line[ctx->pos], ctx->len - ctx->pos);
@ -58,7 +58,7 @@ void del_char_buf_bck(ChatContext *ctx)
/* Deletes the character at pos */
void del_char_buf_frnt(ChatContext *ctx)
{
if (ctx->pos < 0 || ctx->pos >= ctx->len)
if (ctx->pos >= ctx->len)
return;
wmemmove(&ctx->line[ctx->pos], &ctx->line[ctx->pos + 1], ctx->len - ctx->pos - 1);