forked from starlingx-staging/sm-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0003-fix-comparison-between-pointer-and-char.patch
48 lines (42 loc) · 2.18 KB
/
0003-fix-comparison-between-pointer-and-char.patch
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 9e25fd6202e38f1882990cb11c123f4bd8e65263 Mon Sep 17 00:00:00 2001
From: Mingyuan Qi <[email protected]>
Date: Fri, 28 Sep 2018 23:14:27 +0800
Subject: [PATCH] fix comparison between pointer and char
Signed-off-by: Mingyuan Qi <[email protected]>
---
.../sm-db-1.0.0/src/sm_db_service_domain_interfaces.c | 2 +-
service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_neighbors.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_interfaces.c b/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_interfaces.c
index ecdff20..c7d6b65 100644
--- a/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_interfaces.c
+++ b/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_interfaces.c
@@ -363,7 +363,7 @@ SmErrorT sm_db_service_domain_interfaces_update( SmDbHandleT* sm_db_handle,
sm_auth_type_str(record->auth_type) );
}
- if( '\0' != record->auth_key )
+ if( '\0' != record->auth_key[0] )
{
len += snprintf( sql+len, sizeof(sql)-len, "%s = '%s', ",
SM_SERVICE_DOMAIN_INTERFACES_TABLE_COLUMN_AUTH_KEY,
diff --git a/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_neighbors.c b/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_neighbors.c
index 809c801..afdcb7c 100644
--- a/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_neighbors.c
+++ b/service-mgmt/sm-db-1.0.0/src/sm_db_service_domain_neighbors.c
@@ -308,14 +308,14 @@ SmErrorT sm_db_service_domain_neighbors_update( SmDbHandleT* sm_db_handle,
len = snprintf( sql, sizeof(sql), "UPDATE %s SET ",
SM_SERVICE_DOMAIN_NEIGHBORS_TABLE_NAME);
- if( '\0' != record->orchestration )
+ if( '\0' != record->orchestration[0] )
{
len += snprintf( sql+len, sizeof(sql)-len, "%s = '%s', ",
SM_SERVICE_DOMAIN_NEIGHBORS_TABLE_COLUMN_ORCHESTRATION,
record->orchestration );
}
- if( '\0' != record->designation )
+ if( '\0' != record->designation[0] )
{
len += snprintf( sql+len, sizeof(sql)-len, "%s = '%s', ",
SM_SERVICE_DOMAIN_NEIGHBORS_TABLE_COLUMN_DESIGNATION,
--
2.19.0