Skip to content

Commit 7b7cfb5

Browse files
committed
- correct spelling
1 parent 9e1b1da commit 7b7cfb5

File tree

3 files changed

+33
-41
lines changed

3 files changed

+33
-41
lines changed

.codespellrc

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
22
[codespell]
3-
skip = .git,*.pdf,*.svg,go.sum,.codespellrc,po
4-
check-hidden = true
5-
# ignore-regex =
6-
ignore-words-list = childs
3+
skip = po

snapper/Btrfs.cc

+25-25
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ namespace snapper
514514

515515
int status;
516516

517-
map<string, tree_node> childs;
517+
map<string, tree_node> children;
518518

519519
tree_node* find(const string& name);
520520

@@ -540,17 +540,17 @@ namespace snapper
540540
string::size_type pos = name.find('/');
541541
if (pos == string::npos)
542542
{
543-
iterator it = childs.find(name);
544-
if (it == childs.end())
543+
iterator it = children.find(name);
544+
if (it == children.end())
545545
return NULL;
546546

547547
return &it->second;
548548
}
549549
else
550550
{
551551
string a = name.substr(0, pos);
552-
iterator it = childs.find(a);
553-
if (it == childs.end())
552+
iterator it = children.find(a);
553+
if (it == children.end())
554554
return NULL;
555555

556556
string b = name.substr(pos + 1);
@@ -565,18 +565,18 @@ namespace snapper
565565
string::size_type pos = name.find('/');
566566
if (pos == string::npos)
567567
{
568-
iterator it = childs.find(name);
569-
if (it == childs.end())
570-
it = childs.insert(childs.end(), make_pair(name, tree_node()));
568+
iterator it = children.find(name);
569+
if (it == children.end())
570+
it = children.insert(children.end(), make_pair(name, tree_node()));
571571

572572
return &it->second;
573573
}
574574
else
575575
{
576576
string a = name.substr(0, pos);
577-
iterator it = childs.find(a);
578-
if (it == childs.end())
579-
it = childs.insert(childs.end(), make_pair(a, tree_node()));
577+
iterator it = children.find(a);
578+
if (it == children.end())
579+
it = children.insert(children.end(), make_pair(a, tree_node()));
580580

581581
string b = name.substr(pos + 1);
582582
return it->second.insert(b);
@@ -590,12 +590,12 @@ namespace snapper
590590
string::size_type pos = name.find('/');
591591
if (pos == string::npos)
592592
{
593-
iterator it = childs.find(name);
594-
if (it == childs.end())
593+
iterator it = children.find(name);
594+
if (it == children.end())
595595
return false;
596596

597-
if (it->second.childs.empty())
598-
childs.erase(it);
597+
if (it->second.children.empty())
598+
children.erase(it);
599599
else
600600
it->second.status = 0;
601601

@@ -604,15 +604,15 @@ namespace snapper
604604
else
605605
{
606606
string a = name.substr(0, pos);
607-
iterator it = childs.find(a);
608-
if (it == childs.end())
607+
iterator it = children.find(a);
608+
if (it == children.end())
609609
return false;
610610

611611
string b = name.substr(pos + 1);
612612
it->second.erase(b);
613613

614-
if (it->second.status == 0 && it->second.childs.empty())
615-
childs.erase(it);
614+
if (it->second.status == 0 && it->second.children.empty())
615+
children.erase(it);
616616

617617
return true;
618618
}
@@ -631,7 +631,7 @@ namespace snapper
631631
return false;
632632

633633
nn = insert(n);
634-
swap(nn->childs, oo->childs);
634+
swap(nn->children, oo->children);
635635
nn->status = oo->status;
636636
erase(o);
637637

@@ -642,7 +642,7 @@ namespace snapper
642642
void
643643
tree_node::dump(const string& prefix) const
644644
{
645-
for (const_iterator it = childs.begin(); it != childs.end(); ++it)
645+
for (const_iterator it = children.begin(); it != children.end(); ++it)
646646
{
647647
if (prefix.empty())
648648
{
@@ -721,7 +721,7 @@ namespace snapper
721721
void
722722
tree_node::check(StreamProcessor* processor, const string& prefix)
723723
{
724-
for (iterator it = childs.begin(); it != childs.end(); ++it)
724+
for (iterator it = children.begin(); it != children.end(); ++it)
725725
{
726726
if (prefix.empty())
727727
{
@@ -740,7 +740,7 @@ namespace snapper
740740
void
741741
tree_node::result(cmpdirs_cb_t cb, const string& prefix) const
742742
{
743-
for (const_iterator it = childs.begin(); it != childs.end(); ++it)
743+
for (const_iterator it = children.begin(); it != children.end(); ++it)
744744
{
745745
if (prefix.empty())
746746
{
@@ -914,7 +914,7 @@ namespace snapper
914914
merge(StreamProcessor* processor, tree_node* tmp, const string& from, const string& to,
915915
const string& prefix = "")
916916
{
917-
for (tree_node::iterator it = tmp->childs.begin(); it != tmp->childs.end(); ++it)
917+
for (tree_node::iterator it = tmp->children.begin(); it != tmp->children.end(); ++it)
918918
{
919919
if (prefix.empty())
920920
{
@@ -1001,7 +1001,7 @@ namespace snapper
10011001
else
10021002
{
10031003
tree_node tmp;
1004-
swap(it1->childs, tmp.childs);
1004+
swap(it1->children, tmp.children);
10051005

10061006
processor->deleted(from);
10071007
processor->created(to);

zypp-plugin/forwarding-zypp-plugin.cc

+7-12
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ class ForwardingZyppPlugin : public ZyppPlugin
4646
virtual Message dispatch(const Message&) override;
4747
private:
4848
string child_program;
49-
bp::ipstream childs_out; // we read this
50-
// bp::ipstream childs_err; // we read this
51-
bp::opstream childs_in; // we write this
49+
bp::ipstream child_out; // we read this
50+
bp::opstream child_in; // we write this
5251
};
5352

5453

@@ -62,22 +61,18 @@ int
6261
ForwardingZyppPlugin::main()
6362
{
6463
bp::child c(child_program,
65-
bp::std_out > childs_out,
66-
// bp::std_err > childs_err,
67-
bp::std_in < childs_in);
64+
bp::std_out > child_out,
65+
bp::std_in < child_in);
6866

69-
int result = ZyppPlugin::main();
70-
71-
// c.wait();
72-
return result;
67+
return ZyppPlugin::main();
7368
}
7469

7570

7671
ZyppPlugin::Message
7772
ForwardingZyppPlugin::dispatch(const Message& msg)
7873
{
79-
write_message(childs_in, msg);
80-
return read_message(childs_out);
74+
write_message(child_in, msg);
75+
return read_message(child_out);
8176
}
8277

8378

0 commit comments

Comments
 (0)