]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
OpenBSD does not have ENODATA, use EOVERFLOW instead.
authorRoy Marples <roy@marples.name>
Wed, 6 Jan 2016 11:00:59 +0000 (11:00 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Jan 2016 11:00:59 +0000 (11:00 +0000)
dhcp-common.c

index 2e12d00f56951d0ba35719afb7bd525fdf384411..24703d3321a3d4b65dbfa2ed891d654b01dd6f74 100644 (file)
@@ -599,7 +599,7 @@ dhcp_optlen(const struct dhcp_opt *opt, size_t dl)
                /* All other types are variable length */
                if (opt->len) {
                        if ((size_t)opt->len > dl) {
-                               errno = ENODATA;
+                               errno = EOVERFLOW;
                                return -1;
                        }
                        return (ssize_t)opt->len;
@@ -607,7 +607,7 @@ dhcp_optlen(const struct dhcp_opt *opt, size_t dl)
                return (ssize_t)dl;
        }
        if (dl < sz) {
-               errno = ENODATA;
+               errno = EOVERFLOW;
                return -1;
        }