[ltt-dev] [UST PATCH] Introduce a new communication protocol for UST v4
David Goulet
david.goulet at polymtl.ca
Mon Oct 25 11:58:52 EDT 2010
-----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