From a9c0e8a60ce1fa8450dd077d753d34ce2606be46 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 20 Jun 2024 12:45:52 +0200 Subject: [PATCH] More type fixes ##analysis --- libr/anal/d/types.sdb.txt | 77 +++++++++++++++++++++++++++------------ libr/socket/socket_http.c | 2 +- test/db/cmd/cmd_k | 66 +++++++++++++++++++++------------ test/db/cmd/cmd_pd_str | 2 +- test/db/cmd/projects | 4 +- 5 files changed, 99 insertions(+), 52 deletions(-) diff --git a/libr/anal/d/types.sdb.txt b/libr/anal/d/types.sdb.txt index 0c5298ed8e88c..03139b87bad5f 100644 --- a/libr/anal/d/types.sdb.txt +++ b/libr/anal/d/types.sdb.txt @@ -14,10 +14,22 @@ short=type type.short=w type.short.size=16 +FILE=type +type.FILE=p +type.FILE.size=8 + int=type type.int=d type.int.size=32 +pid_t=type +type.pid_t=d +type.pid_t.size=32 + +size_t=type +type.size_t=d +type.size_t.size=32 + long=type type.long=x type.long.size=64 @@ -3104,61 +3116,61 @@ func.warnc.ret=void sysctlbyname=func func.sysctlbyname.args=5 func.sysctlbyname.arg.0=const char *,name -func.sysctlbyname.arg.1=void*,oldp -func.sysctlbyname.arg.2=size_t*,oldlenp -func.sysctlbyname.arg.3=void*,newp -func.sysctlbyname.arg.4=sizei_t,newlen +func.sysctlbyname.arg.1=void *,oldp +func.sysctlbyname.arg.2=size_t *,oldlenp +func.sysctlbyname.arg.3=void *,newp +func.sysctlbyname.arg.4=size_t,newlen func.sysctlbyname.ret=int sysctl=func func.sysctl.args=6 func.sysctl.arg.0=const char *,name func.sysctl.arg.1=int,namelen -func.sysctl.arg.2=void*,oldp -func.sysctl.arg.3=size_t*,oldlenp -func.sysctl.arg.4=void*,newp -func.sysctl.arg.5=sizei_t,newlen +func.sysctl.arg.2=void *,oldp +func.sysctl.arg.3=size_t *,oldlenp +func.sysctl.arg.4=void *,newp +func.sysctl.arg.5=size_t,newlen func.sysctl.ret=int sysctlnametomib=func func.sysctlnametomib.args=3 func.sysctlnametomib.arg.0=const char *,name -func.sysctlnametomib.arg.1=int*,mib -func.sysctlnametomib.arg.2=size_t*,sizep +func.sysctlnametomib.arg.1=int *,mib +func.sysctlnametomib.arg.2=size_t *,sizep func.sysctlnametomib.ret=int tgetent=func func.tgetent.args=2 -func.tgetent.arg.0=const char*,bp -func.tgetent.arg.1=const char*,name +func.tgetent.arg.0=const char *,bp +func.tgetent.arg.1=const char *,name func.tgetent.ret=int tgetflag=func func.tgetflag.args=1 -func.tgetflag.arg.0=const char*,id +func.tgetflag.arg.0=const char *,id func.tgetflag.ret=int tgetstr=func func.tgetstr.args=2 -func.tgetstr.arg.0=char*,id -func.tgetstr.arg.1=char**,area +func.tgetstr.arg.0=char *,id +func.tgetstr.arg.1=char **,area func.tgetstr.ret=char* tgetnum=func func.tgetnum.args=1 -func.tgetnum.arg.0=char*,id +func.tgetnum.arg.0=char *,id func.tgetnum.ret=int readlink=func func.readlink.args=3 -func.readlink.arg.0=const char*,path -func.readlink.arg.1=char*,buf +func.readlink.arg.0=const char *,path +func.readlink.arg.1=char *,buf func.readlink.arg.2=int,bufsize func.readlink.ret=int listxattr=func func.listxattr.args=4 -func.listxattr.arg.0=const char*,path +func.listxattr.arg.0=const char *,path func.listxattr.arg.1=char*,namebuf func.listxattr.arg.2=int,fsize func.listxattr.arg.3=int,options @@ -3167,19 +3179,36 @@ func.listxattr.ret=int getopt_long=func func.getopt_long.args=5 func.getopt_long.arg.0=int,argc -func.getopt_long.arg.1=char**,argv +func.getopt_long.arg.1=char **,argv func.getopt_long.arg.2=const char*,optstring -func.getopt_long.arg.3=void*,longopts +func.getopt_long.arg.3=void *,longopts func.getopt_long.arg.4=int,longidx func.getopt_long.ret=int getbsize=func func.getbsize.args=2 -func.getbsize.arg.0=int*,hdrlenp -func.getbsize.arg.1=int*,bsizep -func.getbsize.ret=char* +func.getbsize.arg.0=int *,hdrlenp +func.getbsize.arg.1=int *,bsizep +func.getbsize.ret=char * fflagtostr=func func.fflagtostr.args=1 func.fflagtostr.arg.0=int,flags func.fflagtostr.ret=char* + +tcgetpgrp=func +func.tcgetpgrp.args=1 +func.tcgetpgrp.arg.0=int,fd +func.tcgetpgrp.ret=pid_t + +sigprocmask=func +func.sigprocmask.args=3 +func.sigprocmask.arg.0=int,how +func.sigprocmask.arg.1=void *,set +func.sigprocmask.arg.2=void *,oldset +func.sigprocmask.ret=pid_t + +fflush_unlocked=func +func.fflush_unlocked.args=1 +func.fflush_unlocked.arg.0=FILE *,stream +func.fflush_unlocked.ret=int diff --git a/libr/socket/socket_http.c b/libr/socket/socket_http.c index 8938606658a8f..ada7a597190a3 100644 --- a/libr/socket/socket_http.c +++ b/libr/socket/socket_http.c @@ -96,7 +96,7 @@ static char *socket_http_answer(RSocket *s, int *code, int *rlen, ut32 redirecti len = olen - (dn - buf); } if (len == 0) { - eprintf ("LEN = 0\n"); + R_LOG_DEBUG ("LEN = 0"); } if (len > 0) { if (len > olen) { diff --git a/test/db/cmd/cmd_k b/test/db/cmd/cmd_k index 9c9c66e0c4f43..a0018697761ae 100644 --- a/test/db/cmd/cmd_k +++ b/test/db/cmd/cmd_k @@ -38,6 +38,7 @@ EXPECT=< /dev/null EOF EXPECT=<