int add_cachebyname( const char *inname, const uuidp_t inuuid, const uuidtype_t type, const unsigned long uid _U_) {
int ret = 0;
char *name = NULL;
- uuidp_t uuid;
+ uuidp_t uuid = NULL;
cacheduser_t *cacheduser = NULL;
unsigned char hash;
int add_cachebyuuid( uuidp_t inuuid, const char *inname, uuidtype_t type, const unsigned long uid _U_) {
int ret = 0;
char *name = NULL;
- uuidp_t uuid;
+ uuidp_t uuid = NULL;
cacheduser_t *cacheduser = NULL;
cacheduser_t *entry;
unsigned char hash;
*/
ssize_t readt(int socket, void *data, const size_t length, int setnonblocking, int timeout)
{
- size_t stored;
- ssize_t len;
+ size_t stored = 0;
+ ssize_t len = 0;
struct timeval now, end, tv;
fd_set rfds;
int ret;
- stored = 0;
-
if (setnonblocking) {
if (setnonblock(socket, 1) != 0)
return -1;