]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rev: simplify new line detection and impossible test
authorSami Kerola <kerolasa@iki.fi>
Sun, 2 Jun 2013 17:51:17 +0000 (18:51 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Jun 2013 10:24:47 +0000 (12:24 +0200)
commitb2e081ce0f81f6c4d6601665bfa447da28973bf3
tree33b2e9f915cd509f001c57dc587ac7fdf2d40f39
parent7c7061f7713e47b435ce1924b225fb64d1ae56d5
rev: simplify new line detection and impossible test

The new line detection is earlier using only '\n' so there should not be
need to search for '\r' later.

The detection whether allocated address is pointing to null seems to be
unnecessary.  Assuming xmalloc() returned valid address space the address
should never be 0.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/rev.c