mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Avoid uninitialized variable
This commit is contained in:
parent
eeb2893f9c
commit
0f4306d0d9
@ -120,8 +120,7 @@ serial_t *openserial(const char *path, int mode, char *msg)
|
|||||||
std::string s_aux = "/dev/" + std::string(port);
|
std::string s_aux = "/dev/" + std::string(port);
|
||||||
s_aux.resize(128, '\0');
|
s_aux.resize(128, '\0');
|
||||||
int n = s_aux.length();
|
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))
|
if ((mode & STR_MODE_R) && (mode & STR_MODE_W))
|
||||||
rw = O_RDWR;
|
rw = O_RDWR;
|
||||||
|
Loading…
Reference in New Issue
Block a user