test for zero length

dev
Tom Early 5 years ago
parent 4989f88f98
commit 148c2c20bd

@ -62,13 +62,13 @@ bool CDVAPDongle::Initialize(const char *devpath, const char *serialno, const in
{ {
bool ok = false; bool ok = false;
if (devpath) if (strlen(devpath))
{ {
// device path is specified in cfg file, try to open it // device path is specified in cfg file, try to open it
ok = open_device(devpath); ok = open_device(devpath);
if (! ok) if (! ok)
{ {
fprintf(stderr, "Device %s could not be opened\n", devpath); fprintf(stderr, "Device '%s' could not be opened\n", devpath);
} }
} }
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.