blob: e5ba6e5197bacd708d15fc27b18b75b65cc69bc1 [file] [log] [blame]
/* See COPYRIGHT for copyright information. */
#pragma once
#include <ros/errno.h>
typedef int error_t;
#define MAX_ERRNO 4095
#define ERR_PTR(err) ((void *)((intptr_t)(err)))
#define PTR_ERR(ptr) ((intptr_t)(ptr))
#define IS_ERR(ptr) (-(intptr_t)(ptr) <= MAX_ERRNO)
#define IS_ERR_OR_NULL(ptr) (!(ptr) || IS_ERR(ptr))