Skip to content
Browse files

"if (strlen(msg))" -> "if (msg[0])"

  • Loading branch information...
1 parent 7af8b13 commit b761131fecf82634e925e63898d8d5bc3c5e860f @ojwb ojwb committed Feb 17, 2014
Showing with 3 additions and 3 deletions.
  1. +1 −1 Lib/php/director.swg
  2. +1 −1 Lib/python/director.swg
  3. +1 −1 Lib/ruby/director.swg
View
2 Lib/php/director.swg
@@ -127,7 +127,7 @@ namespace Swig {
std::string swig_msg;
public:
DirectorException(int code, const char *hdr, const char *msg TSRMLS_DC) : swig_msg(hdr) {
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}
View
2 Lib/python/director.swg
@@ -179,7 +179,7 @@ namespace Swig {
public:
DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) {
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}
View
2 Lib/ruby/director.swg
@@ -118,7 +118,7 @@ namespace Swig {
}
DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) {
- if (strlen(msg)) {
+ if (msg[0]) {
swig_msg += " ";
swig_msg += msg;
}

0 comments on commit b761131

Please sign in to comment.
Something went wrong with that request. Please try again.