Re: [PATCH] Teach mailsplit about Maildir's

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

 



"Fernando J. Pereda" <ferdy@xxxxxxxxxx> writes:

>> > +static int split_maildir(const char *maildir, const char *dir,
>> > +	int nr_prec, int skip)
>> > +{
>> > +	char file[PATH_MAX];
>> > +	char curdir[PATH_MAX];
>> > +	char name[PATH_MAX];
>> >  	int ret = -1;
>> > +	struct path_list list = {NULL, 0, 0, 1};
>> >  
>> > +	snprintf(curdir, sizeof(curdir), "%s/cur", maildir);
>> > +	if (populate_maildir_list(&list, curdir) < 0)
>> > +		goto out;
>> >  
>> > +	int i;
>> 
>> Decl-after-statement.
>
> I did it because other parts of the file do it too. Do you want me to
> fix the rest of them?

My "gcc -Werror -Wall -Wdeclaration-after-statement" does not
seem to find any in the existing code, but if you found any
please fix that in a separate patch.

>> > @@ -186,9 +249,39 @@ int cmd_mailsplit(int argc, const char **argv, const char *prefix)
>> > ...
>> > +		if (ret < 0) {
>> > +			error("cannot split patches from %s", arg);
>> > +			return 1;
>> > +		}
>> > +		num += ret;
>> > +	}
>> > +
>> > +	printf("%d\n", num);
>> >  
>> > -	return ret == -1;
>> > +	return 0;
>> >  }
>> 
>> We do not signal error anymore from the command?
>
> If we reached that part of the code, there is no error to signal about.
> We signal error when either split_mbox or split_maildir fail by
> returning 1.

Ok, you are right.

Thanks.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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