Skip to content

Commit

Permalink
util/StringStrip: use std::strlen()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Oct 15, 2020
1 parent dd791d8 commit 6bb883b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/util/StringStrip.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2018 Max Kellermann <[email protected]>
* Copyright 2009-2020 Max Kellermann <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -30,7 +30,7 @@
#include "StringStrip.hxx"
#include "CharUtil.hxx"

#include <string.h>
#include <cstring>

const char *
StripLeft(const char *p) noexcept
Expand Down Expand Up @@ -71,7 +71,7 @@ StripRight(const char *p, std::size_t length) noexcept
void
StripRight(char *p) noexcept
{
std::size_t old_length = strlen(p);
std::size_t old_length = std::strlen(p);
std::size_t new_length = StripRight(p, old_length);
p[new_length] = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/StringStrip.hxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2018 Max Kellermann <[email protected]>
* Copyright 2009-2020 Max Kellermann <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down

0 comments on commit 6bb883b

Please sign in to comment.