Print this page
5910 libnisdb won't build with modern GCC
@@ -18,16 +18,15 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2015 Gary Mills
* Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/systeminfo.h>
#include <strings.h>
#include <rpcsvc/nis.h>
#include "nis_parse_ldap_conf.h"
@@ -213,11 +212,11 @@
free(str);
return (0);
}
for (s = c = 0; s < len; s = e+1) {
/* Skip blank space, if any */
- for (0; str[s] == ' ' || str[s] == '\t'; s++);
+ for (; str[s] == ' ' || str[s] == '\t'; s++);
/* Find delimiter (comma) or end of string */
for (e = s; str[e] != '\0' && str[e] != ','; e++);
str[e] = '\0';
tmp = scat(myself, T, sdup(myself, T, "("),
scat(myself, F, &str[s], ")"));
@@ -283,11 +282,11 @@
str = sdup(myself, T, filter);
if (str == 0)
return (0);
for (s = 2; s < len; s = e+1) {
/* Skip past the '(' */
- for (0; s < len && str[s] != '('; s++);
+ for (; s < len && str[s] != '('; s++);
s++;
if (s >= len)
break;
for (e = s; str[e] != '\0' && str[e] != ')'; e++);
str[e] = '\0';