Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/iscsi/dist/src/lib fix null argument



details:   https://anonhg.NetBSD.org/src/rev/93fbee517e42
branches:  trunk
changeset: 943575:93fbee517e42
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 06 17:06:20 2020 +0000

description:
fix null argument

diffstat:

 external/bsd/iscsi/dist/src/lib/initiator.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r ff5066091a0d -r 93fbee517e42 external/bsd/iscsi/dist/src/lib/initiator.c
--- a/external/bsd/iscsi/dist/src/lib/initiator.c       Sun Sep 06 16:44:16 2020 +0000
+++ b/external/bsd/iscsi/dist/src/lib/initiator.c       Sun Sep 06 17:06:20 2020 +0000
@@ -906,7 +906,8 @@
        }
        iscsi_trace(TRACE_ISCSI_DEBUG, "initializing initiator\n");
        iscsi_trace(TRACE_ISCSI_DEBUG,
-               "target config filename to read from:%s\n", gfilename);
+               "target config filename to read from: %s\n", gfilename
+               ? gfilename : "(null)");
        port = atoi(iscsi_initiator_getvar(ini, "target port"));
        if (get_target_config(iscsi_initiator_getvar(ini,
                                "target hostname"), port) != 0) {
@@ -3714,7 +3715,9 @@
 
        USE_ARG(address_family);
        iscsi_trace(TRACE_ISCSI_DEBUG, "initializing initiator\n");
-       iscsi_trace(TRACE_ISCSI_DEBUG, "target config filename to read from:%s\n", gfilename);
+       iscsi_trace(TRACE_ISCSI_DEBUG,
+           "target config filename to read from: %s\n", gfilename ?
+           gfilename : "(null)");
        if (get_target_config(hostname, port) != 0) {
                iscsi_err(__FILE__, __LINE__, "Error getting target configuration from config file\n");
                return -1;



Home | Main Index | Thread Index | Old Index