lua: include /opt/local/lib and /opt/local/include in the search path on mac os x
[project/uci.git] / uci_internal.h
index 3bd55a1..02f81f5 100644 (file)
@@ -9,7 +9,7 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
  */
 
 #ifndef __UCI_INTERNAL_H
@@ -186,9 +186,9 @@ struct uci_backend _var = {         \
 #define UCI_HANDLE_ERR(ctx) do {       \
        DPRINTF("ENTER: %s\n", __func__); \
        int __val = 0;                  \
-       ctx->err = 0;                   \
        if (!ctx)                       \
                return UCI_ERR_INVAL;   \
+       ctx->err = 0;                   \
        if (!ctx->internal && !ctx->nested) \
                __val = setjmp(ctx->trap); \
        ctx->internal = false;          \