cipher: Remove useless NULL check.
authorWerner Koch <wk@gnupg.org>
Mon, 16 Mar 2015 08:01:24 +0000 (09:01 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 16 Mar 2015 08:31:03 +0000 (09:31 +0100)
commitfbb97dcf763e28e81e01092ad4c934b3eaf88cc8
tree84d2235d6a1de2783157bf0ac66b622cdb308520
parent5e66a4f8d5a63f58caeee367433dd8dd32346083
cipher: Remove useless NULL check.

* cipher/hash-common.c (_gcry_md_block_write): Remove NUL check for
hd->buf.
--

HD->BUF is not allocated but part of the struct.  HD has already be
dereferenced twice thus the check does not make sense.  Detected by
Stack 0.3:

  bug: anti-simplify
  model: |
    %cmp4 = icmp eq i8* %arraydecay, null, !dbg !29
    -->  false
  stack:
    - /home/wk/s/libgcrypt/cipher/hash-common.c:114:0
  ncore: 1
  core:
    - /home/wk/s/libgcrypt/cipher/hash-common.c:108:0
      - null pointer dereference

Signed-off-by: Werner Koch <wk@gnupg.org>
cipher/hash-common.c