<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> +#define CRED_UNPARSABLE 0<br>
<br>
</div> ^^^ minor nit...should be "UNPARSEABLE".<br>
<div><br></div></blockquote><div>Not nitpicking at all, spelling mistakes in code are embarrassing. I had a feeling I should have double checked the spelling on that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
> +static int parse_cred_line(char* line, char* target)<br>
> +{<br>
> + if (line == NULL)<br>
> + goto parsing_err;<br>
> +<br>
> + /* position target at first char of value */<br>
> + target = strchr(line, '=');<br>
> + if (!target)<br>
> + goto parsing_err;<br>
> + target++;<br>
<br>
</div>^^^^<br>
I don't think this will work. C does pass by value. Here you're passing<br>
in "target" as a pointer. That value will be updated in the local copy<br>
of that pointer in parse_cred_line, but caller will not see that you've<br>
changed it. If you want to do this, you need to pass "target" as a<br>
pointer to a pointer and fix the references to it accordingly.<br></blockquote><div>D'oh. It's been a few years since I've touched pointers at all. Easy enough change.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br><br>
</div>There are also some minor whitespace issues with these patches too<br>
(trailing whitespace on a few lines). </blockquote><div>Yeah, I found out that the formatting problems that I've been having are due to UTF-8 and interaction between git-format-patch and git-send-email. I added a format section to my .gitconfig (and git-format-patch seemed happy), but I guess I've still got an issue. :/</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since you'll need to fix the<br>
above anyway, it would be good to fix those as well.<br>
<br>
You might want to run the <a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> script from the Linux kernel<br>
sources against these patches and fix the problems it says too. I'd<br>
like to see this code follow the Linux kernel coding standards for the<br>
most part.<br></blockquote><div> Will do.</div></div>