Back to index

tor  0.2.3.19-rc
di_ops.h
Go to the documentation of this file.
00001 /* Copyright (c) 2003-2004, Roger Dingledine
00002  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
00003  * Copyright (c) 2007-2012, The Tor Project, Inc. */
00004 /* See LICENSE for licensing information */
00005 
00011 #ifndef TOR_DI_OPS_H
00012 #define TOR_DI_OPS_H
00013 
00014 #include "orconfig.h"
00015 #include "torint.h"
00016 
00017 int tor_memcmp(const void *a, const void *b, size_t sz);
00018 int tor_memeq(const void *a, const void *b, size_t sz);
00019 #define tor_memneq(a,b,sz) (!tor_memeq((a),(b),(sz)))
00020 
00026 #define fast_memcmp(a,b,c) (memcmp((a),(b),(c)))
00027 #define fast_memeq(a,b,c)  (0==memcmp((a),(b),(c)))
00028 #define fast_memneq(a,b,c) (0!=memcmp((a),(b),(c)))
00029 
00030 #endif
00031