File: 0001-Fix-strcmp-usage.patch

package info (click to toggle)
fastddsgen 4.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 924 kB
  • sloc: java: 3,546; sh: 168; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Tue, 27 Aug 2024 23:51:02 +0200
Subject: Fix strcmp() usage

---
 .../java/com/eprosima/fastdds/idl/templates/DDSApplicationSource.stg  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/eprosima/fastdds/idl/templates/DDSApplicationSource.stg b/src/main/java/com/eprosima/fastdds/idl/templates/DDSApplicationSource.stg
index 0957d63..e0a24e2 100644
--- a/src/main/java/com/eprosima/fastdds/idl/templates/DDSApplicationSource.stg
+++ b/src/main/java/com/eprosima/fastdds/idl/templates/DDSApplicationSource.stg
@@ -30,11 +30,11 @@ std::shared_ptr<$ctx.filename$Application> $ctx.filename$Application::make_app(
         const std::string& entity_kind)
 {
     std::shared_ptr<$ctx.filename$Application> entity;
-    if (strcmp(entity_kind.c_str(), "publisher") == 0)
+    if (entity_kind == "publisher")
     {
         entity = std::make_shared<$ctx.filename$PublisherApp>(domain_id);
     }
-    else if (strcmp(entity_kind.c_str(), "subscriber") == 0)
+    else if (entity_kind == "subscriber")
     {
         entity = std::make_shared<$ctx.filename$SubscriberApp>(domain_id);
     }