[Spice-devel] [vdagent-win v1 1/2] file-transfer: fix typos
Victor Toso
victortoso at redhat.com
Thu Aug 11 13:25:15 UTC 2016
Hi,
On Thu, Aug 11, 2016 at 08:56:11AM -0400, Frediano Ziglio wrote:
> >
> > ---
> > vdagent/file_xfer.cpp | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp
> > index 58d3a31..cbf7e5e 100644
> > --- a/vdagent/file_xfer.cpp
> > +++ b/vdagent/file_xfer.cpp
> > @@ -86,7 +86,7 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage*
> > start,
> >
> > wlen = _tcslen(file_path);
> > // make sure we have enough space
> > - // (1 char for separator, 1 char for filename and 1 char for NUL
> > terminator)
> > + // (1 char for separator, 1 char for filename and 1 char for NULL
> > terminator)
>
> Ehm.. no, a string is NUL terminated, is not an array of pointers
> but an array of characters and NUL is the character with 0 encoding :)
>
> Actually I had a doubt about EBCDIC, from https://it.wikipedia.org/wiki/EBCDIC
> looks like NUL is 0 even on EBCDIC.
Ah, sure. I removed this one from the patch. Thanks!
>
> > if (wlen + 3 >= MAX_PATH) {
> > vd_printf("error: file too long %ls\\%s", file_path, file_name);
> > return;
> > @@ -159,7 +159,7 @@ void
> > FileXfer::handle_status(VDAgentFileXferStatusMessage* status)
> >
> > vd_printf("id %u result %u", status->id, status->result);
> > if (status->result != VD_AGENT_FILE_XFER_STATUS_CANCELLED) {
> > - vd_printf("only cancel is premitted");
> > + vd_printf("only cancel is permitted");
> > return;
> > }
> > iter = _tasks.find(status->id);
>
> Frediano
More information about the Spice-devel
mailing list