kopia lustrzana https://github.com/Hamlib/Hamlib
Fix possible null pointer warning from cppcheck
https://github.com/Hamlib/Hamlib/issues/1351pull/1404/head
rodzic
1a4a189dbc
commit
717a451d9c
|
@ -469,7 +469,7 @@ int HAMLIB_API amp_close(AMP *amp)
|
||||||
if (amp == NULL || amp->caps == NULL)
|
if (amp == NULL || amp->caps == NULL)
|
||||||
{
|
{
|
||||||
amp_debug(RIG_DEBUG_ERR, "%s: NULL ptr? amp=%p, amp->caps=%p\n", __func__, amp,
|
amp_debug(RIG_DEBUG_ERR, "%s: NULL ptr? amp=%p, amp->caps=%p\n", __func__, amp,
|
||||||
amp->caps);
|
amp->caps==NULL?NULL:amp->caps);
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -641,7 +641,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (rig == NULL)
|
if (rig == NULL)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "rig==NULL?\n");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(rig->state.rigport.pathname, "/dev/ttyUSB0", HAMLIB_FILPATHLEN - 1);
|
strncpy(rig->state.rigport.pathname, "/dev/ttyUSB0", HAMLIB_FILPATHLEN - 1);
|
||||||
|
|
Ładowanie…
Reference in New Issue