public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Petri Latvala <petri.latvala@intel.com>, igt-dev@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 08/21] benchmarks/wsim: Handle a parse error
Date: Wed, 16 Jan 2019 11:45:38 +0000	[thread overview]
Message-ID: <db4e2c22-fe3b-9512-b963-edd7e99d9ea2@linux.intel.com> (raw)
In-Reply-To: <20190116112050.27647-9-petri.latvala@intel.com>


On 16/01/2019 11:20, Petri Latvala wrote:
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   benchmarks/gem_wsim.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
> index e0709487..5a4753d9 100644
> --- a/benchmarks/gem_wsim.c
> +++ b/benchmarks/gem_wsim.c
> @@ -483,6 +483,14 @@ parse_workload(struct w_arg *arg, unsigned int flags, struct workload *app_w)
>   				goto add_step;
>   			}
>   
> +			if (!field) {

field has already been checked to be valid in this block:

		if ((field = strtok_r(fstart, ".", &fctx))) {

Regards,

Tvrtko

> +				if (verbose)
> +					fprintf(stderr,
> +						"Parse error at step %u!\n",
> +						nr_steps);
> +				return NULL;
> +			}
> +
>   			tmp = atoi(field);
>   			if (tmp < 0) {
>   				if (verbose)
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-01-16 11:45 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 11:20 [igt-dev] [PATCH i-g-t 00/21] Static analysis: misc cleanups and fixes Petri Latvala
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 01/21] lib: Introduce igt_assume() Petri Latvala
2019-01-16 14:26   ` Chris Wilson
2019-01-18 10:34   ` [igt-dev] [PATCH i-g-t v2 " Petri Latvala
2019-01-21 11:33     ` [igt-dev] [PATCH i-g-t v3 01/21] lib: Introduce BUILD_BUG_ON_INVALID and igt_assume() Petri Latvala
2019-01-21 11:41       ` Chris Wilson
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 02/21] lib/i915/gem_context: Help static analysis with execution flow Petri Latvala
2019-01-16 11:30   ` Chris Wilson
2019-01-16 14:22   ` Chris Wilson
2019-01-18 10:42   ` [igt-dev] [PATCH i-g-t v2 " Petri Latvala
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 03/21] lib/ioctl_wrappers: " Petri Latvala
2019-01-18 10:42   ` [igt-dev] [PATCH i-g-t v2 " Petri Latvala
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 04/21] lib/igt_kms: Use correct type for calloc Petri Latvala
2019-01-17  9:55   ` Abdiel Janulgue
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 05/21] tests: " Petri Latvala
2019-01-16 11:28   ` Kahola, Mika
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 06/21] lib: Avoid memcpying 0 bytes from NULL Petri Latvala
2019-01-17 11:14   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 07/21] overlay: Write out the assumption for kernel-provided data Petri Latvala
2019-01-28 13:21   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 08/21] benchmarks/wsim: Handle a parse error Petri Latvala
2019-01-16 11:45   ` Tvrtko Ursulin [this message]
2019-01-16 12:03     ` Petri Latvala
2019-01-16 12:07       ` Chris Wilson
2019-01-16 12:08       ` Tvrtko Ursulin
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 09/21] lib/igt_kms: Make igt_display_init require at least one plane Petri Latvala
2019-01-16 17:11   ` Robert Foss
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 10/21] tests/kms_color: Assert gamma look up table sizes Petri Latvala
2019-01-28 13:04   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 11/21] lib/igt_kms: Assert that active crtcs have at least one plane Petri Latvala
2019-01-16 11:30   ` Kahola, Mika
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 12/21] benchmarks/gem_userptr_benchmark: Correctly free memory Petri Latvala
2019-01-16 11:48   ` Tvrtko Ursulin
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 13/21] lib/igt_alsa: Remove dead assignment Petri Latvala
2019-01-16 14:14   ` Paul Kocialkowski
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 14/21] lib/igt_audio: Initialize freq in audio_signal_detect() Petri Latvala
2019-01-16 14:16   ` Paul Kocialkowski
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 15/21] igt_aux: Handle empty pm_test file gracefully Petri Latvala
2019-01-28 13:18   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 16/21] lib/igt_core: Assert that optarg is present Petri Latvala
2019-01-17 12:17   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 17/21] lib/igt_core: Handle all failures to read .igtrc Petri Latvala
2019-01-16 14:18   ` Paul Kocialkowski
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 18/21] lib/igt_core: Initialize fds in igt_system_quiet Petri Latvala
2019-01-17  9:56   ` Abdiel Janulgue
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 19/21] lib/igt_kms: Aid static analyzer with the control flow Petri Latvala
2019-01-28 13:17   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 20/21] lib/igt_x86: Mock-use variable to silence static analysis Petri Latvala
2019-01-28 13:11   ` Arkadiusz Hiler
2019-01-16 11:20 ` [igt-dev] [PATCH i-g-t 21/21] lib/drmtest: Don't read from NULL in set_forced_driver Petri Latvala
2019-01-16 12:15   ` Rodrigo Siqueira
2019-01-16 12:12 ` [igt-dev] ✓ Fi.CI.BAT: success for Static analysis: misc cleanups and fixes Patchwork
2019-01-16 22:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-18 11:22 ` [igt-dev] ✗ Fi.CI.BAT: failure for Static analysis: misc cleanups and fixes (rev4) Patchwork
2019-01-18 12:44 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-01-18 17:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-21 12:09 ` [igt-dev] ✓ Fi.CI.BAT: success for Static analysis: misc cleanups and fixes (rev5) Patchwork
2019-01-21 16:21 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db4e2c22-fe3b-9512-b963-edd7e99d9ea2@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=tvrtko.ursulin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox