diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-09 23:53:35 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-09 23:53:35 +0100 |
commit | 37156ad580a07413383d3ca5d95f19ea1bc1f716 (patch) | |
tree | a184d83d1c25c9a493ca9ee8fb29e2ca75aa77cd /termkey.c | |
parent | 2b08f88f19b0270c9db993c940181535c33a71b3 (diff) | |
download | termo-37156ad580a07413383d3ca5d95f19ea1bc1f716.tar.gz termo-37156ad580a07413383d3ca5d95f19ea1bc1f716.tar.xz termo-37156ad580a07413383d3ca5d95f19ea1bc1f716.zip |
Added some TODO notes about handling realloc() failures
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -471,6 +471,7 @@ void termkey_pushinput(termkey_t *tk, unsigned char *input, size_t inputlen) tk->buffsize *= 2; unsigned char *newbuffer = realloc(tk->buffer, tk->buffsize); + // TODO: Handle realloc() failure tk->buffer = newbuffer; } @@ -503,6 +504,7 @@ termkey_keysym termkey_register_keyname(termkey_t *tk, termkey_keysym sym, const if(sym >= tk->nkeynames) { const char **new_keynames = realloc(tk->keynames, sizeof(new_keynames[0]) * (sym + 1)); + // TODO: Handle realloc() failure tk->keynames = new_keynames; // Fill in the hole |