mirror of
https://github.com/davatorium/rofi.git
synced 2025-04-14 17:43:01 -04:00
Remove unneeded check.
This commit is contained in:
parent
b7d9b4b6b5
commit
56e023dcee
1 changed files with 1 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue