Skip to content

Commit

Permalink
smallut: get rid of useless variable
Browse files Browse the repository at this point in the history
  • Loading branch information
medoc92 committed Jan 7, 2024
1 parent 65e3568 commit 9ee6b21
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/utils/smallut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,7 @@ void catstrerror(std::string *reason, const char *what, int _errno)
}

reason->append(": errno: ");

auto nbuf = std::to_string(_errno);
reason->append(nbuf);

reason->append(std::to_string(_errno));
reason->append(" : ");

#if defined(sun) || defined(_WIN32)
Expand All @@ -1178,11 +1175,11 @@ void catstrerror(std::string *reason, const char *what, int _errno)
// https://www.zverovich.net/2015/03/13/reliable-detection-of-strerror-variants.html
char errbuf[200];
errbuf[0] = 0;
reason->append(_check_strerror_r(
strerror_r(_errno, errbuf, sizeof(errbuf)), errbuf));
reason->append(_check_strerror_r(strerror_r(_errno, errbuf, sizeof(errbuf)), errbuf));
#endif
}


#ifndef SMALLUT_NO_REGEX
#ifdef USE_STD_REGEX

Expand Down

0 comments on commit 9ee6b21

Please sign in to comment.