diff options
Diffstat (limited to 'user_data.c')
-rw-r--r-- | user_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/user_data.c b/user_data.c index 5e7c028..e7d2e2a 100644 --- a/user_data.c +++ b/user_data.c @@ -90,10 +90,10 @@ void userdata_unregister(i64 userid,int fd){ const int* userdata_online(i64 userid,i64 *nfds){ struct hash_item *item=find_userdata(userid); if(!item){ - *nfds=0; + if(nfds)*nfds=0; return NULL; } assert(item->data.fds_len!=0); - *nfds=item->data.fds_len; + if(nfds)*nfds=item->data.fds_len; return item->data.fds; } |