uhttpd: - fix parsing of interpreter entries in the config file, fixes serving of...
[openwrt/staging/mkresin.git] / package / uhttpd / src / uhttpd-utils.h
index 95535d6fe74ce5138d4ccd60342bd9ce3c2145cc..3514ce1caca730337caf04a926de0f212b5ac01a 100644 (file)
 #define fd_cloexec(fd) \
        fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)
 
+#define ensure_out(x) \
+       do { if((x) < 0) goto out; } while(0)
+
+#define ensure_ret(x) \
+       do { if((x) < 0) return -1; } while(0)
+
+
 struct path_info {
        char *root;
        char *phys;