projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fmal: Avoid test failure on OpenBSD 5.1/SPARC64.
[gnulib.git]
/
lib
/
xgetdomainname.c
diff --git
a/lib/xgetdomainname.c
b/lib/xgetdomainname.c
index
1d557d6
..
d428c8d
100644
(file)
--- a/
lib/xgetdomainname.c
+++ b/
lib/xgetdomainname.c
@@
-1,6
+1,6
@@
/* xgetdomainname.c -- Return the NIS domain name, without size limitations.
/* xgetdomainname.c -- Return the NIS domain name, without size limitations.
- Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008
Free Softwar
e
- Foundation, Inc.
+ Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008
-2012 Fre
e
+
Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-61,14
+61,14
@@
xgetdomainname (void)
domainname[k] = '\0';
err = getdomainname (domainname, size);
if (err >= 0 && domainname[k] == '\0')
domainname[k] = '\0';
err = getdomainname (domainname, size);
if (err >= 0 && domainname[k] == '\0')
- break;
+
break;
else if (err < 0 && errno != EINVAL)
else if (err < 0 && errno != EINVAL)
- {
- int saved_errno = errno;
- free (domainname);
- errno = saved_errno;
- return NULL;
- }
+
{
+
int saved_errno = errno;
+
free (domainname);
+
errno = saved_errno;
+
return NULL;
+
}
size *= 2;
domainname = xrealloc (domainname, size);
}
size *= 2;
domainname = xrealloc (domainname, size);
}