[ltt-dev] [UST PATCH] Introduce a new communication protocol for UST v4

Nils Carlson nils.carlson at ericsson.com
Tue Oct 26 02:53:48 EDT 2010


I'll take that as an ACK and push now!

:-)

I'm really tired of that patch!

/Nils 

-----Original Message-----
From: David Goulet [mailto:david.goulet at polymtl.ca] 
Sent: den 25 oktober 2010 17:59
To: Nils Carlson
Cc: ltt-dev at lists.casi.polymtl.ca
Subject: Re: [ltt-dev] [UST PATCH] Introduce a new communication protocol for UST v4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 10-10-25 02:40 AM, Nils Carlson wrote:
> +
> +static int scan_ch_and_num(const char *ch_num, char **channel, 
> +unsigned int *num) {
> +	int result;
> +
> +	*channel = NULL;
> +
> +	result = sscanf(ch_num, "%a[^/]/%u", channel, num);
> +	if (result == 0) {
> +		ERR("Failed to parse channel and number, got EOF");
> +		return -1;
> +	} else if (result < 0) {
> +		PERROR("Failed to parse channel and number");
> +		return -1;
> +	} else if (result != 2) {
> +		ERR("Failed to parse channel and number");
> +		if (channel) {
> +			free(channel);

*channel

Might want to have the same result handling then the previous function that you changed using only result != 2.

This review should be the last one ;) Everything seems good! It passes every torture test and standard test we and I have :)

Cheers!
David

> +		}
> +		return -1;
> +	} else if (result == 2) {
> +		return 0;
> +	}
> +}
> +
>  int main(int argc, char *argv[])
>  {
>  	pid_t *pidit;
> @@ -301,16 +352,31 @@ int main(int argc, char *argv[])
>  				break;
>  			case ENABLE_MARKER:
>  				if (opts.regex) {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzFqTwACgkQSvfBSxa9hWPFRACcDPXSVp1xra4JhI3+N4fwCX+F
F7UAnRmTsgF/Y9rV+TrCXT4th+XZwHuo
=xLEg
-----END PGP SIGNATURE-----




More information about the lttng-dev mailing list