Re: [PATCH 07/15] sequencer: make sequencer_make_script() write its script to a strbuf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:

>>  		if (entry)
>> -			fprintf(out, "\n%c Branch %s\n", comment_line_char, entry->string);
>> +			strbuf_addf(out, "\n%c Branch %s\n", comment_line_char, entry->string);
>>  		else
>> -			fprintf(out, "\n");
>> +			strbuf_addf(out, "\n");
>
> Please use plain strbuf_add() here.

FWIW, contrib/coccinelle/strbuf.cocci.patch gave us this:

diff -u -p a/sequencer.c b/sequencer.c
--- a/sequencer.c
+++ b/sequencer.c
@@ -4311,7 +4311,7 @@ static int make_script_with_merges(struc
 		if (entry)
 			strbuf_addf(out, "\n%c Branch %s\n", comment_line_char, entry->string);
 		else
-			strbuf_addf(out, "\n");
+			strbuf_addstr(out, "\n");
 
 		while (oidset_contains(&interesting, &commit->object.oid) &&
 		       !oidset_contains(&shown, &commit->object.oid)) {



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux