Page MenuHomePhabricator

Elementary: cnp - check on NULL data in elm_drag_start
ClosedPublic

Authored by artem.popov on Jun 30 2016, 2:07 AM.

Details

Summary

check on NULL add in wayland elm_drag_start API
@fix

Test Plan

Call elm_grag_start with data = NULL under wayland

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
artem.popov updated this revision to Diff 9461.Jun 30 2016, 2:07 AM
artem.popov retitled this revision from to Elementary: cnp - check on NULL data in elm_drag_start.
artem.popov updated this object.
artem.popov edited the test plan for this revision. (Show Details)
artem.popov added reviewers: NikaWhite, zmike.
NikaWhite accepted this revision.Jun 30 2016, 2:10 AM
NikaWhite edited edge metadata.

Look good for me

This revision is now accepted and ready to land.Jun 30 2016, 2:10 AM

Just a style wish. Thanks for the patch

src/lib/elementary/elm_cnp.c
3348–3354

Its just a matter of style, but i would preffer

wl_cnp_selection.selbuf = NULL;
wl_cnp_selection.buflen = 0;
if (data)
  {
     do the strdup / strlen here
  }

just for readability reasons.

Otherwise, good catch! :)

jpeg added inline comments.Jun 30 2016, 7:02 PM
src/lib/elementary/elm_cnp.c
3348–3354

or use eina_strdup()
:)

Okay JP you won :P

artem.popov updated this revision to Diff 9475.Jul 1 2016, 3:11 AM
artem.popov edited edge metadata.

update: use eina_strdup instead of strdup

Guys, you won both

jpeg accepted this revision.Jul 3 2016, 6:44 PM
jpeg added a reviewer: jpeg.

yeah it really didn't matter much. let me merge this :)

Closed by commit rEFL71a0573187a7: Elementary: cnp - check on NULL data in elm_drag_start (authored by artem.popov, committed by Jean-Philippe Andre <jp.andre@samsung.com>). · Explain WhyJul 3 2016, 7:25 PM
This revision was automatically updated to reflect the committed changes.