dtcm: Coverity 87942
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 18:14:45 +0000 (19:14 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 18:14:45 +0000 (19:14 +0100)
cde/programs/dtcm/dtcm/cm_insert.c

index f445141beb97948879df1297e56ea6da83c9b0ca..404417268a8e7a3a8ef3ba7dc6bfa3af3b973df2 100644 (file)
@@ -189,7 +189,7 @@ prompt_for_insert(Props *p) {
                format_time(now(), dt, cm_start);
                prompt_for_line(catgets(DT_catd, 1, 196, 
                        "Start (%s): "), cm_start, cm_start);
-               if (cm_start && cm_start[0])
+               if (cm_start[0])
                {
                        timecopy = (char *)cm_strdup(cm_start);
                        if (valid_time(p, timecopy))
@@ -205,7 +205,7 @@ prompt_for_insert(Props *p) {
         next = next + hrsec;
 
        format_time(next, dt, cm_end);
-       if (cm_start && cm_start[0])
+       if (cm_start[0])
                prompt_for_line(
                        catgets(DT_catd, 1, 198, "End (%s): "), cm_end, cm_end);
        else