Remove unneeded check.

This commit is contained in:
QC 2015-10-11 14:13:08 +02:00
parent b7d9b4b6b5
commit 56e023dcee
1 changed files with 1 additions and 6 deletions

View File

@ -75,14 +75,9 @@ static char **get_dmenu ( unsigned int *length )
size_t blength = buffer_end - &(buffer[0]);
char *copy = g_malloc( blength + 1 );
char *copy = g_malloc0( blength + 1 );
memcpy(copy, buffer, blength);
// Filter out line-end.
if ( copy[blength] == '\n' ) {
copy[blength] = '\0';
}
retv[( *length )] = copy;
retv[( *length ) + 1] = NULL;