Skip to content

Commit 7cd75c0

Browse files
author
Shuotian Cheng
authored
[saimeta]: Fix typo: > then -> >; don't exists -> doesn't exist (sonic-net#339)
Signed-off-by: Shu0T1an ChenG <[email protected]>
1 parent 1c06195 commit 7cd75c0

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

meta/sai_meta.cpp

+21-21
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void set_object(
457457

458458
if (!object_exists(key))
459459
{
460-
SWSS_LOG_THROW("FATAL: object %s don't exists", key.c_str());
460+
SWSS_LOG_THROW("FATAL: object %s doesn't exist", key.c_str());
461461
}
462462

463463
META_LOG_DEBUG(md, "set attribute %d on %s", attr->id, key.c_str());
@@ -474,7 +474,7 @@ const std::vector<std::shared_ptr<SaiAttrWrapper>> get_object_attributes(
474474

475475
if (!object_exists(key))
476476
{
477-
SWSS_LOG_THROW("FATAL: object %s don't exists", key.c_str());
477+
SWSS_LOG_THROW("FATAL: object %s doesn't exist", key.c_str());
478478
}
479479

480480
std::vector<std::shared_ptr<SaiAttrWrapper>> attrs;
@@ -498,7 +498,7 @@ void remove_object(
498498

499499
if (!object_exists(key))
500500
{
501-
SWSS_LOG_THROW("FATAL: object %s don't exists", key.c_str());
501+
SWSS_LOG_THROW("FATAL: object %s doesn't exist", key.c_str());
502502
}
503503

504504
SWSS_LOG_DEBUG("removing object %s", key.c_str());
@@ -533,7 +533,7 @@ sai_status_t meta_generic_validation_objlist(
533533

534534
if (count > MAX_LIST_COUNT)
535535
{
536-
META_LOG_ERROR(md, "object list count %u is > then max list count %u", count, MAX_LIST_COUNT);
536+
META_LOG_ERROR(md, "object list count %u > max list count %u", count, MAX_LIST_COUNT);
537537

538538
return SAI_STATUS_INVALID_PARAMETER;
539539
}
@@ -626,7 +626,7 @@ sai_status_t meta_generic_validation_objlist(
626626

627627
if (!object_reference_exists(query_switch_id))
628628
{
629-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", query_switch_id);
629+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", query_switch_id);
630630
return SAI_STATUS_INVALID_PARAMETER;
631631
}
632632

@@ -652,7 +652,7 @@ sai_status_t meta_genetic_validation_list(
652652

653653
if (count > MAX_LIST_COUNT)
654654
{
655-
META_LOG_ERROR(md, "list count %u is > then max list count %u", count, MAX_LIST_COUNT);
655+
META_LOG_ERROR(md, "list count %u > max list count %u", count, MAX_LIST_COUNT);
656656

657657
return SAI_STATUS_INVALID_PARAMETER;
658658
}
@@ -924,7 +924,7 @@ sai_status_t meta_generic_validate_non_object_on_create(
924924

925925
if (!object_reference_exists(oid_switch_id))
926926
{
927-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", oid_switch_id);
927+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", oid_switch_id);
928928

929929
return SAI_STATUS_INVALID_PARAMETER;
930930
}
@@ -950,7 +950,7 @@ sai_status_t meta_generic_validation_create(
950950

951951
if (attr_count > MAX_LIST_COUNT)
952952
{
953-
SWSS_LOG_ERROR("create attribute count is too large %u > then max list count %u", attr_count, MAX_LIST_COUNT);
953+
SWSS_LOG_ERROR("create attribute count %u > max list count %u", attr_count, MAX_LIST_COUNT);
954954

955955
return SAI_STATUS_INVALID_PARAMETER;
956956
}
@@ -1002,14 +1002,14 @@ sai_status_t meta_generic_validation_create(
10021002

10031003
if (!object_exists(switch_meta_key))
10041004
{
1005-
SWSS_LOG_ERROR("switch id 0x%lx don't exists yet", switch_id);
1005+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist yet", switch_id);
10061006

10071007
return SAI_STATUS_INVALID_PARAMETER;
10081008
}
10091009

10101010
if (!object_reference_exists(switch_id))
10111011
{
1012-
SWSS_LOG_ERROR("switch id 0x%lx don't exists yet", switch_id);
1012+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist yet", switch_id);
10131013

10141014
return SAI_STATUS_INVALID_PARAMETER;
10151015
}
@@ -1691,7 +1691,7 @@ sai_status_t meta_generic_validation_remove(
16911691

16921692
if (!object_reference_exists(oid))
16931693
{
1694-
SWSS_LOG_ERROR("object 0x%lx reference don't exists", oid);
1694+
SWSS_LOG_ERROR("object 0x%lx reference doesn't exist", oid);
16951695

16961696
return SAI_STATUS_INVALID_PARAMETER;
16971697
}
@@ -1776,7 +1776,7 @@ sai_status_t meta_generic_validation_set(
17761776

17771777
if (!object_reference_exists(switch_id))
17781778
{
1779-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", switch_id);
1779+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", switch_id);
17801780
return SAI_STATUS_INVALID_PARAMETER;
17811781
}
17821782
}
@@ -2150,7 +2150,7 @@ sai_status_t meta_generic_validation_get(
21502150

21512151
if (attr_count > MAX_LIST_COUNT)
21522152
{
2153-
SWSS_LOG_ERROR("get attribute count is too large %u > then max list count %u", attr_count, MAX_LIST_COUNT);
2153+
SWSS_LOG_ERROR("get attribute count %u > max list count %u", attr_count, MAX_LIST_COUNT);
21542154

21552155
return SAI_STATUS_INVALID_PARAMETER;
21562156
}
@@ -2452,7 +2452,7 @@ sai_status_t meta_generic_validation_get_stats(
24522452

24532453
if (count > MAX_LIST_COUNT)
24542454
{
2455-
SWSS_LOG_ERROR("get stats count is too large %u > then max list count %u", count, MAX_LIST_COUNT);
2455+
SWSS_LOG_ERROR("get stats count %u > max list count %u", count, MAX_LIST_COUNT);
24562456

24572457
return SAI_STATUS_INVALID_PARAMETER;
24582458
}
@@ -2558,7 +2558,7 @@ void meta_generic_validation_post_create(
25582558

25592559
if (!object_reference_exists(query_switch_id))
25602560
{
2561-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", query_switch_id);
2561+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", query_switch_id);
25622562
break;
25632563
}
25642564

@@ -3138,7 +3138,7 @@ void meta_generic_validation_post_get_objlist(
31383138

31393139
if (count > MAX_LIST_COUNT)
31403140
{
3141-
META_LOG_ERROR(md, "returned get object list count %u is > then max list count %u", count, MAX_LIST_COUNT);
3141+
META_LOG_ERROR(md, "returned get object list count %u > max list count %u", count, MAX_LIST_COUNT);
31423142
}
31433143

31443144
if (list == NULL)
@@ -3208,7 +3208,7 @@ void meta_generic_validation_post_get_objlist(
32083208

32093209
if (!object_reference_exists(query_switch_id))
32103210
{
3211-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", query_switch_id);
3211+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", query_switch_id);
32123212
}
32133213

32143214
if (query_switch_id != switch_id)
@@ -3222,7 +3222,7 @@ void meta_generic_validation_post_get_objlist(
32223222
{\
32233223
if (list.count > MAX_LIST_COUNT)\
32243224
{\
3225-
META_LOG_ERROR(md, "list count %u is > then max list count %u", list.count, MAX_LIST_COUNT);\
3225+
META_LOG_ERROR(md, "list count %u > max list count %u", list.count, MAX_LIST_COUNT);\
32263226
}\
32273227
}
32283228

@@ -4595,7 +4595,7 @@ sai_status_t meta_sai_get_oid(
45954595

45964596
if (!object_reference_exists(switch_id))
45974597
{
4598-
SWSS_LOG_ERROR("switch id 0x%lx don't exists", switch_id);
4598+
SWSS_LOG_ERROR("switch id 0x%lx doesn't exist", switch_id);
45994599
}
46004600

46014601
meta_generic_validation_post_get(meta_key, switch_id, attr_count, attr_list);
@@ -4864,7 +4864,7 @@ sai_status_t meta_sai_flush_fdb_entries(
48644864

48654865
if (attr_count > MAX_LIST_COUNT)
48664866
{
4867-
SWSS_LOG_ERROR("create attribute count is too large %u > then max list count %u", attr_count, MAX_LIST_COUNT);
4867+
SWSS_LOG_ERROR("create attribute count %u > max list count %u", attr_count, MAX_LIST_COUNT);
48684868

48694869
return SAI_STATUS_INVALID_PARAMETER;
48704870
}
@@ -4889,7 +4889,7 @@ sai_status_t meta_sai_flush_fdb_entries(
48894889

48904890
if (!object_reference_exists(switch_id))
48914891
{
4892-
SWSS_LOG_ERROR("switch id %s don't exists",
4892+
SWSS_LOG_ERROR("switch id %s doesn't exist",
48934893
sai_serialize_object_id(switch_id).c_str());
48944894

48954895
return SAI_STATUS_INVALID_PARAMETER;

0 commit comments

Comments
 (0)