Use `uintptr_t` to cast the con id to int instead of `long int`. This
type is guaranteed to hold the pointer as an int regardless of platform.
fixes #2283
* commands.c: all command functions (see commands_parser.c)
*
*/
+#include <stdint.h>
#include <float.h>
#include <stdarg.h>
ystr("success");
y(bool, true);
ystr("id");
- y(integer, (long int)con);
+ y(integer, (uintptr_t)con);
y(map_close);
cmd_output->needs_tree_render = true;
#include "all.h"
#include "yajl_utils.h"
+#include <stdint.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
y(map_open);
ystr("id");
- y(integer, (long int)con);
+ y(integer, (uintptr_t)con);
ystr("type");
switch (con->type) {
ystr("focus");
y(array_open);
TAILQ_FOREACH(node, &(con->focus_head), focused) {
- y(integer, (long int)node);
+ y(integer, (uintptr_t)node);
}
y(array_close);