]> uap-core.de Git - note.git/commitdiff
fix error check in swap_result callback
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 26 Mar 2026 17:12:05 +0000 (18:12 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 26 Mar 2026 17:12:05 +0000 (18:12 +0100)
application/nbconfig.c

index 5f04251cf3511b731a588601fb7d33f9ebb15e11..e48c1ec5d85d0797f735242fe95d4fc5ce050d4c 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "nbconfig.h"
 
+#include <stdio.h>
+#include <stdlib.h>
 #include <cx/array_list.h>
 #include <cx/hash_map.h>
 
@@ -427,7 +429,7 @@ Resource* nbconfig_notebooklist_find_next(NotebookConfigDialog *wdata, Resource
 }
 
 static void swap_result(UiEvent *event, int error, void *userdata) {
-    if(!error == 0) {
+    if(error != 0) {
         fprintf(stderr, "Error: cannot wrap notebook positions\n");
     }
 }