diff --git a/src/algorithms/libs/rtklib/rtklib_stream.cc b/src/algorithms/libs/rtklib/rtklib_stream.cc index 4e6f0a0a1..75b576efc 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.cc +++ b/src/algorithms/libs/rtklib/rtklib_stream.cc @@ -120,8 +120,7 @@ serial_t *openserial(const char *path, int mode, char *msg) std::string s_aux = "/dev/" + std::string(port); s_aux.resize(128, '\0'); int n = s_aux.length(); - if (n < 128) - for (int i = 0; i < n; i++) dev[i] = s_aux[i]; + for (int i = 0; i < n; i++) dev[i] = s_aux[i]; if ((mode & STR_MODE_R) && (mode & STR_MODE_W)) rw = O_RDWR;