New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli tool: reimplement stdin buffering in -F. #1985

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@monnerat
Collaborator

monnerat commented Oct 12, 2017

Dummy PR to check new code on APPVeyor/Travis CI

/* Check if file is "-". If so, use a callback to read OUR stdin (to
/* Mime part callbacks for stdin. */
static size_t stdin_read(char *buffer, size_t size, size_t nitems, void *arg)

This comment has been minimized.

@bagder

bagder Oct 12, 2017

Member

There's already a file2memory function you should use instead!

@bagder

bagder Oct 12, 2017

Member

There's already a file2memory function you should use instead!

}
/* Shrink buffer to spare memory resources. */
if(sip->size < sip->curpos)
sip->data = realloc(sip->data, (size_t) sip->size);

This comment has been minimized.

@bagder

bagder Oct 12, 2017

Member

Even shrinking can fail so this return code must be checked and bail out if you fail.

@bagder

bagder Oct 12, 2017

Member

Even shrinking can fail so this return code must be checked and bail out if you fail.

@monnerat

This comment has been minimized.

Show comment
Hide comment
@monnerat

monnerat Oct 12, 2017

Collaborator

Pushed: 665b3e4

Collaborator

monnerat commented Oct 12, 2017

Pushed: 665b3e4

@monnerat monnerat closed this Oct 12, 2017

@monnerat monnerat deleted the monnerat:buffer_stdin branch Oct 12, 2017

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Oct 12, 2017

Member

Yes, but none of my remarks were addressed?

And please use 'closes #[num]' in commit messages that close PRs (or "closes [URL]")

Member

bagder commented Oct 12, 2017

Yes, but none of my remarks were addressed?

And please use 'closes #[num]' in commit messages that close PRs (or "closes [URL]")

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Oct 12, 2017

Member

oh, did I remark after it was merged perhaps? I think you need to give us slightly more time to review...

Member

bagder commented Oct 12, 2017

oh, did I remark after it was merged perhaps? I think you need to give us slightly more time to review...

@monnerat

This comment has been minimized.

Show comment
Hide comment
@monnerat

monnerat Oct 12, 2017

Collaborator

oh, did I remark after it was merged perhaps? I think you need to give us slightly more time to review...

Yes, I think so: I've just received the mails.

Thanks for your review and I'll take your remarks in consideration. I was not expecting it but just wanted to have checks on cross-platforms :-)

Collaborator

monnerat commented Oct 12, 2017

oh, did I remark after it was merged perhaps? I think you need to give us slightly more time to review...

Yes, I think so: I've just received the mails.

Thanks for your review and I'll take your remarks in consideration. I was not expecting it but just wanted to have checks on cross-platforms :-)

monnerat added a commit that referenced this pull request Oct 12, 2017

@monnerat

This comment has been minimized.

Show comment
Hide comment
@monnerat

monnerat Oct 12, 2017

Collaborator

There's already a file2memory function you should use instead!

Fixed: 5650905

Collaborator

monnerat commented Oct 12, 2017

There's already a file2memory function you should use instead!

Fixed: 5650905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment