|
From: | Benno Schulenberg |
Subject: | Re: [Nano-devel] adding the ability to paste at an input prompt |
Date: | Tue, 25 Jul 2017 22:00:11 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Op 24-07-2017 om 21:50 schreef David Ramsey:
Two minor nits: strlen() returns size_t, not int; and the assignment of fusion doesn't use nano's malloc() wrappers as the rest of the code does. Couldn't these lines in the last patch + int pastelen = strlen(cutbuffer->data); + char *fusion = malloc((strlen(answer) + pastelen + 1) * sizeof(char)); be changed to these? + size_t pastelen = strlen(cutbuffer->data); + char *fusion = charalloc(strlen(answer) + pastelen + 1);
Yes, better. Thanks. Benno
[Prev in Thread] | Current Thread | [Next in Thread] |