Print this page
10110 get_tz_countries shouldn't check array for NULL

@@ -22,11 +22,13 @@
 /*
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>

@@ -209,14 +211,10 @@
         struct tz_country *head = NULL, *prev = NULL, *next, *cp, *cp2;
         int sav_errno = 0, ncount, i;
         int cmp, status;
         size_t len, len_coord, len_ctnt;
 
-        if (cont->ctnt_name == NULL) {
-                errno = EINVAL;
-                return (-1);
-        }
         len_ctnt = strlen(cont->ctnt_name);
         ccbuf[0] = '\0';
 
         /* open zone_sun.tab and country.tab files */
         if ((fp_zone = fopen(ZONE_SUN_TAB, "r")) == NULL) {