Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Linux] remove duplicate clone_string() in favor of g_strdup() #34031

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Jun 14, 2022

GLib's g_strdup() offers the same behavior that it returns NULL if the argument is NULL: https://docs.gtk.org/glib/func.strdup.html

For reference: gstrfuncs.c#L344-L370

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

GLib's g_strdup() offers the same behavior that it returns NULL if the
argument is NULL: https://docs.gtk.org/glib/func.strdup.html
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always wanted to do this. Thanks for finding it!

@dkwingsmt dkwingsmt merged commit 83b9a59 into flutter:main Jun 24, 2022
@jpnurmi jpnurmi deleted the clone-string branch June 24, 2022 20:07
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 24, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 24, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 24, 2022
bdero added a commit to flutter/flutter that referenced this pull request Jun 25, 2022
* 9508a36 Roll Dart SDK from 692562354d6d to d3b8091c30f0 (1 revision) (flutter/engine#34273)

* a2985c0 Roll Fuchsia Linux SDK from F1U6IH2Nf... to aRT7s0Yct... (flutter/engine#34251)

* 54867f3 Roll Skia from bdd0205ae470 to 4345a2ea731a (1 revision) (flutter/engine#34268)

* 98221a2 Clean up text input configuration in clearTextInputClient (flutter/engine#34209)

* b9e02cc Adds a license check shard to CI (flutter/engine#34274)

* 1daf7ba [Impeller] Metal:Reset Encoder viewport and scissor rect in case the command specifies no opinion (flutter/engine#34252)

* 83b9a59 [Linux] remove duplicate clone_string() in favor of g_strdup() (flutter/engine#34031)

* Don't use .packages

* Another attempt

Co-authored-by: engine-flutter-autoroll <[email protected]>
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
* 9508a36 Roll Dart SDK from 692562354d6d to d3b8091c30f0 (1 revision) (flutter/engine#34273)

* a2985c0 Roll Fuchsia Linux SDK from F1U6IH2Nf... to aRT7s0Yct... (flutter/engine#34251)

* 54867f3 Roll Skia from bdd0205ae470 to 4345a2ea731a (1 revision) (flutter/engine#34268)

* 98221a2 Clean up text input configuration in clearTextInputClient (flutter/engine#34209)

* b9e02cc Adds a license check shard to CI (flutter/engine#34274)

* 1daf7ba [Impeller] Metal:Reset Encoder viewport and scissor rect in case the command specifies no opinion (flutter/engine#34252)

* 83b9a59 [Linux] remove duplicate clone_string() in favor of g_strdup() (flutter/engine#34031)

* Don't use .packages

* Another attempt

Co-authored-by: engine-flutter-autoroll <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants