All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seung-Woo Kim <sw0312.kim@samsung.com>
To: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
	emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm] modetest: Fix to check return value of asprintf()
Date: Tue, 23 Jan 2018 09:29:35 +0900	[thread overview]
Message-ID: <5A6681EF.4000806@samsung.com> (raw)
In-Reply-To: <20180122120733.43s5ivxqr4vbdra7@imgtec.com>

Hello,

On 2018년 01월 22일 21:09, Eric Engestrom wrote:
> On Wednesday, 2018-01-10 11:16:41 +0900, Seung-Woo Kim wrote:
>> There is warning about ignoring return value of 'asprintf'. Fix to
>> check return value of asprintf().
>>
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> 
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> 
> Do you have commit access or would you like me to push it for you?

Thanks for reviewing. I don't have access permission, so please push it.

Best Regards,
- Seung-Woo Kim

> 
>> ---
>>  tests/modetest/modetest.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
>> index 62d9332..0773bd0 100644
>> --- a/tests/modetest/modetest.c
>> +++ b/tests/modetest/modetest.c
>> @@ -656,10 +656,13 @@ static struct resources *get_resources(struct device *dev)
>>  	for (i = 0; i < res->res->count_connectors; i++) {
>>  		struct connector *connector = &res->connectors[i];
>>  		drmModeConnector *conn = connector->connector;
>> +		int num;
>>  
>> -		asprintf(&connector->name, "%s-%u",
>> +		num = asprintf(&connector->name, "%s-%u",
>>  			 util_lookup_connector_type_name(conn->connector_type),
>>  			 conn->connector_type_id);
>> +		if (num < 0)
>> +			goto error;
>>  	}
>>  
>>  #define get_properties(_res, __res, type, Type)					\
>> -- 
>> 1.7.4.1
>>
> 
> 
> 

-- 
Seung-Woo Kim
Samsung Research
--

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2018-01-23  0:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180110021623epcas1p2e9aaf571b99cd306a066bdc80822a84a@epcas1p2.samsung.com>
2018-01-10  2:16 ` [PATCH libdrm] modetest: Fix to check return value of asprintf() Seung-Woo Kim
2018-01-22 12:09   ` Eric Engestrom
2018-01-23  0:29     ` Seung-Woo Kim [this message]

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=5A6681EF.4000806@samsung.com \
    --to=sw0312.kim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=eric.engestrom@imgtec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.