From: Philippe Waroquiers Date: Wed, 27 Jan 2016 22:35:14 +0000 (+0000) Subject: Fix misplaced closing parenthesis in various VG_(....) calls X-Git-Tag: svn/VALGRIND_3_12_0~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e1687cb8c8b5d7c4bec2ad4f697aec171a5fe8;p=thirdparty%2Fvalgrind.git Fix misplaced closing parenthesis in various VG_(....) calls At many places, we have: VG_(fun(a,b,c)) instead of VG_(fun)(a,b,c) So, fix these cases, found using: grep -n -i -e 'VG_([a-z][a-z0-9_]*[^a-z0-9_)]' *.c */*.c */*/*.c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15776 --- diff --git a/callgrind/main.c b/callgrind/main.c index 2a9d44ef14..b62e835da3 100644 --- a/callgrind/main.c +++ b/callgrind/main.c @@ -1576,7 +1576,7 @@ static void print_monitor_help ( void ) static Bool handle_gdb_monitor_command (ThreadId tid, const HChar *req) { HChar* wcmd; - HChar s[VG_(strlen(req)) + 1]; /* copy for strtok_r */ + HChar s[VG_(strlen)(req) + 1]; /* copy for strtok_r */ HChar *ssaveptr; VG_(strcpy) (s, req); @@ -2024,7 +2024,7 @@ void CLG_(post_clo_init)(void) CLG_(instrument_state) = CLG_(clo).instrument_atstart; - if (VG_(clo_verbosity > 0)) { + if (VG_(clo_verbosity) > 0) { VG_(message)(Vg_UserMsg, "For interactive control, run 'callgrind_control%s%s -h'.\n", (VG_(arg_vgdb_prefix) ? " " : ""), diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index f6c1a41118..38b7533afd 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -335,7 +335,7 @@ static Addr aspacem_vStart = 0; #define AM_SANITY_CHECK \ do { \ - if (VG_(clo_sanity_level >= 3)) \ + if (VG_(clo_sanity_level) >= 3) \ aspacem_assert(VG_(am_do_sync_check) \ (__PRETTY_FUNCTION__,__FILE__,__LINE__)); \ } while (0) diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index b4e498da72..d51b8d2445 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -640,7 +640,7 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, ULong max_size) /* First, count how many memory segments to dump */ num_phdrs = 1; /* start with notes */ for(i = 0; i < n_seg_starts; i++) { - if (!may_dump(VG_(am_find_nsegment(seg_starts[i])))) + if (!may_dump(VG_(am_find_nsegment)(seg_starts[i]))) continue; num_phdrs++; @@ -698,7 +698,7 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, ULong max_size) off = VG_PGROUNDUP(off); for(i = 0, idx = 1; i < n_seg_starts; i++) { - seg = VG_(am_find_nsegment(seg_starts[i])); + seg = VG_(am_find_nsegment)(seg_starts[i]); if (!may_dump(seg)) continue; @@ -721,7 +721,7 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, ULong max_size) VG_(lseek)(core_fd, phdrs[1].p_offset, VKI_SEEK_SET); for(i = 0, idx = 1; i < n_seg_starts; i++) { - seg = VG_(am_find_nsegment(seg_starts[i])); + seg = VG_(am_find_nsegment)(seg_starts[i]); if (!should_dump(seg)) continue; diff --git a/coregrind/m_coredump/coredump-solaris.c b/coregrind/m_coredump/coredump-solaris.c index 3a12b78e64..337edc6c48 100644 --- a/coregrind/m_coredump/coredump-solaris.c +++ b/coregrind/m_coredump/coredump-solaris.c @@ -920,7 +920,7 @@ void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, Int i; UInt num_phdrs = 2; /* two CORE note sections */ for (i = 0; i < n_seg_starts; i++) { - if (!may_dump(VG_(am_find_nsegment(seg_starts[i])))) + if (!may_dump(VG_(am_find_nsegment)(seg_starts[i]))) continue; num_phdrs++; @@ -1051,7 +1051,7 @@ void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, /* fill program headers for segments */ UInt idx; for (i = 0, idx = 2; i < n_seg_starts; i++) { - NSegment const *seg = VG_(am_find_nsegment(seg_starts[i])); + NSegment const *seg = VG_(am_find_nsegment)(seg_starts[i]); if (!may_dump(seg)) continue; @@ -1078,7 +1078,7 @@ void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, VG_(lseek)(core_fd, phdrs[2].p_offset, VKI_SEEK_SET); for (i = 0, idx = 2; i < n_seg_starts; i++) { - NSegment const *seg = VG_(am_find_nsegment(seg_starts[i])); + NSegment const *seg = VG_(am_find_nsegment)(seg_starts[i]); if (!should_dump(seg)) continue; diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 4dc1129660..6b4f0c9d60 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -2017,7 +2017,7 @@ Bool VG_(get_objname) ( Addr a, const HChar** buf ) knows the name of the file associated with this mapping. This allows us to print the names of exe/dll files in the stack trace when running programs under wine. */ - if ( (seg = VG_(am_find_nsegment(a))) != NULL + if ( (seg = VG_(am_find_nsegment)(a)) != NULL && (filename = VG_(am_get_filename)(seg)) != NULL ) { *buf = filename; return True; diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 3d406a4824..3f48b2bc8e 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -609,15 +609,15 @@ static DiSlice getsectdata ( DiSlice img, if (cmd.cmd == LC_SEGMENT_CMD) { struct SEGMENT_COMMAND seg; ML_(cur_read_get)(&seg, cur, sizeof(seg)); - if (0 == VG_(strncmp(&seg.segname[0], - segname, sizeof(seg.segname)))) { + if (0 == VG_(strncmp)(&seg.segname[0], + segname, sizeof(seg.segname))) { DiCursor sects_cur = ML_(cur_plus)(cur, sizeof(seg)); Int s; for (s = 0; s < seg.nsects; s++) { struct SECTION sect; ML_(cur_step_get)(§, §s_cur, sizeof(sect)); - if (0 == VG_(strncmp(sect.sectname, sectname, - sizeof(sect.sectname)))) { + if (0 == VG_(strncmp)(sect.sectname, sectname, + sizeof(sect.sectname))) { DiSlice res = img; res.ioff = sect.offset; res.szB = sect.size; diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index ce876152c2..cb87c7e1c0 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -221,7 +221,7 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) /* ret[0 .. envc-1] is live now. */ /* Find and remove a binding for VALGRIND_LAUNCHER. */ for (i = 0; i < envc; i++) - if (0 == VG_(memcmp(ret[i], v_launcher, v_launcher_len))) + if (0 == VG_(memcmp)(ret[i], v_launcher, v_launcher_len)) break; if (i < envc) { diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index ee4f155c08..df913da641 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -236,7 +236,7 @@ static HChar **setup_client_env(HChar **origenv, const HChar *toolname) SizeT v_launcher_len = VG_(strlen)(v_launcher); for (i = 0; i < envc; i++) - if (!VG_(memcmp(ret[i], v_launcher, v_launcher_len))) { + if (!VG_(memcmp)(ret[i], v_launcher, v_launcher_len)) { /* VALGRIND_LAUNCHER was found. */ break; } diff --git a/coregrind/m_libcbase.c b/coregrind/m_libcbase.c index 0d715fa6dc..29ede3b48e 100644 --- a/coregrind/m_libcbase.c +++ b/coregrind/m_libcbase.c @@ -446,7 +446,7 @@ VG_(strtok_r) (HChar* s, const HChar* delim, HChar** saveptr) s = *saveptr; /* Scan leading delimiters. */ - s += VG_(strspn (s, delim)); + s += VG_(strspn) (s, delim); if (*s == '\0') { *saveptr = s; @@ -455,7 +455,7 @@ VG_(strtok_r) (HChar* s, const HChar* delim, HChar** saveptr) /* Find the end of the token. */ token = s; - s = VG_(strpbrk (token, delim)); + s = VG_(strpbrk) (token, delim); if (s == NULL) /* This token finishes the string. */ *saveptr = token + VG_(strlen) (token); diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 9b659ae564..36489c3721 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1315,7 +1315,7 @@ static void print_preamble ( Bool logging_to_fd, VG_(printf_xml)("\n"); } - if (VG_(clo_xml) || VG_(clo_verbosity > 0)) { + if (VG_(clo_xml) || VG_(clo_verbosity) > 0) { if (VG_(clo_xml)) VG_(printf_xml)("\n"); diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index f029c2ab5e..3e8326f984 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -2910,7 +2910,7 @@ void pp_ksigaction ( vki_sigaction_toK_t* sa ) ); VG_(printf)("pp_ksigaction: { "); for (i = 1; i <= VG_(max_signal); i++) - if (VG_(sigismember(&(sa->sa_mask),i))) + if (VG_(sigismember)(&(sa->sa_mask),i)) VG_(printf)("%d ", i); VG_(printf)("}\n"); } diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 44282164e5..384d342a3f 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -426,7 +426,7 @@ static void clean_schedctl_data(ThreadId tid) if (a != 0) { tst->os_state.schedctl_data = 0; a = VG_PGROUNDDN(a); - if (VG_(am_find_anon_segment(a))) + if (VG_(am_find_anon_segment)(a)) VG_(am_notify_munmap)(a, VKI_PAGE_SIZE); } } @@ -9023,7 +9023,7 @@ POST(sys_door) if (params->rbuf) { Addr addr = (Addr)params->rbuf; - if (!VG_(am_find_anon_segment(addr))) { + if (!VG_(am_find_anon_segment)(addr)) { /* This segment is new and was mapped by the kernel. */ UInt prot, flags; SizeT size; @@ -9121,7 +9121,7 @@ POST(sys_schedctl) tst->os_state.schedctl_data = a; /* Returned address points to a block in a mapped page. */ - if (!VG_(am_find_anon_segment(a))) { + if (!VG_(am_find_anon_segment)(a)) { Addr page = VG_PGROUNDDN(a); UInt prot = VKI_PROT_READ | VKI_PROT_WRITE | VKI_PROT_EXEC; UInt flags = VKI_MAP_ANONYMOUS; @@ -9135,9 +9135,9 @@ POST(sys_schedctl) /* The kernel always places redzone before and after the allocated page. Check this assertion now; the tool can later request to allocate a Valgrind segment and aspacemgr will place it adjacent. */ - const NSegment *seg = VG_(am_find_nsegment(page - 1)); + const NSegment *seg = VG_(am_find_nsegment)(page - 1); vg_assert(seg == NULL || seg->kind == SkResvn); - seg = VG_(am_find_nsegment(page + VKI_PAGE_SIZE)); + seg = VG_(am_find_nsegment)(page + VKI_PAGE_SIZE); vg_assert(seg == NULL || seg->kind == SkResvn); /* The address space manager works with whole pages. */ diff --git a/coregrind/m_transtab.c b/coregrind/m_transtab.c index b9cce99201..c1822eeca8 100644 --- a/coregrind/m_transtab.c +++ b/coregrind/m_transtab.c @@ -2019,7 +2019,7 @@ void VG_(discard_translations) ( Addr guest_start, ULong range, guest_start, range, who ); /* Pre-deletion sanity check */ - if (VG_(clo_sanity_level >= 4)) { + if (VG_(clo_sanity_level) >= 4) { Bool sane = sanity_check_all_sectors(); vg_assert(sane); } @@ -2107,7 +2107,7 @@ void VG_(discard_translations) ( Addr guest_start, ULong range, unredir_discard_translations( guest_start, range ); /* Post-deletion sanity check */ - if (VG_(clo_sanity_level >= 4)) { + if (VG_(clo_sanity_level) >= 4) { TTEno i; TTEntry* tte; Bool sane = sanity_check_all_sectors(); diff --git a/drd/drd_clientreq.c b/drd/drd_clientreq.c index 47405d3aa4..cd8dca4f7c 100644 --- a/drd/drd_clientreq.c +++ b/drd/drd_clientreq.c @@ -80,7 +80,7 @@ static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret) UWord result = 0; const DrdThreadId drd_tid = DRD_(thread_get_running_tid)(); - tl_assert(vg_tid == VG_(get_running_tid())); + tl_assert(vg_tid == VG_(get_running_tid)()); tl_assert(DRD_(VgThreadIdToDrdThreadId)(vg_tid) == drd_tid || (VG_USERREQ__GDB_MONITOR_COMMAND == arg[0] && vg_tid == VG_INVALID_THREADID)); diff --git a/drd/drd_load_store.c b/drd/drd_load_store.c index f968bcc1db..928e3d6c54 100644 --- a/drd/drd_load_store.c +++ b/drd/drd_load_store.c @@ -180,7 +180,7 @@ VG_REGPARM(2) void DRD_(trace_load)(Addr addr, SizeT size) #ifdef ENABLE_DRD_CONSISTENCY_CHECKS /* The assert below has been commented out because of performance reasons.*/ tl_assert(DRD_(thread_get_running_tid)() - == DRD_(VgThreadIdToDrdThreadId)(VG_(get_running_tid()))); + == DRD_(VgThreadIdToDrdThreadId)(VG_(get_running_tid)())); #endif if (DRD_(running_thread_is_recording_loads)() @@ -246,7 +246,7 @@ VG_REGPARM(2) void DRD_(trace_store)(Addr addr, SizeT size) #ifdef ENABLE_DRD_CONSISTENCY_CHECKS /* The assert below has been commented out because of performance reasons.*/ tl_assert(DRD_(thread_get_running_tid)() - == DRD_(VgThreadIdToDrdThreadId)(VG_(get_running_tid()))); + == DRD_(VgThreadIdToDrdThreadId)(VG_(get_running_tid)())); #endif if (DRD_(running_thread_is_recording_stores)() diff --git a/exp-sgcheck/pc_common.c b/exp-sgcheck/pc_common.c index d891d444a5..827a3db262 100644 --- a/exp-sgcheck/pc_common.c +++ b/exp-sgcheck/pc_common.c @@ -779,7 +779,7 @@ const HChar* pc_get_error_name ( const Error* err ) SizeT pc_get_extra_suppression_info ( const Error* err, /*OUT*/HChar* buf, Int nBuf ) { - ErrorKind ekind = VG_(get_error_kind )(err); + ErrorKind ekind = VG_(get_error_kind)(err); tl_assert(buf); tl_assert(nBuf >= 1); diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 9aed05afa2..3c1f12cafb 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -284,7 +284,7 @@ static void lockN_acquire_writer ( Lock* lk, Thread* thr ) /* 2nd and subsequent locking of a lock by its owner */ tl_assert(lk->heldW); /* assert: lk is only held by one thread .. */ - tl_assert(VG_(sizeUniqueBag(lk->heldBy)) == 1); + tl_assert(VG_(sizeUniqueBag)(lk->heldBy) == 1); /* assert: .. and that thread is 'thr'. */ tl_assert(VG_(elemBag)(lk->heldBy, (UWord)thr) == VG_(sizeTotalBag)(lk->heldBy)); @@ -4902,7 +4902,7 @@ static void print_monitor_help ( void ) static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req) { HChar* wcmd; - HChar s[VG_(strlen(req))]; /* copy for strtok_r */ + HChar s[VG_(strlen)(req)]; /* copy for strtok_r */ HChar *ssaveptr; Int kwdid; diff --git a/massif/ms_main.c b/massif/ms_main.c index 021d790952..66f9be9cc4 100644 --- a/massif/ms_main.c +++ b/massif/ms_main.c @@ -2358,7 +2358,7 @@ static void handle_all_snapshots_monitor_command (const HChar *filename) static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req) { HChar* wcmd; - HChar s[VG_(strlen(req)) + 1]; /* copy for strtok_r */ + HChar s[VG_(strlen)(req) + 1]; /* copy for strtok_r */ HChar *ssaveptr; VG_(strcpy) (s, req); diff --git a/memcheck/mc_errors.c b/memcheck/mc_errors.c index 6b763f1241..7b5b36a982 100644 --- a/memcheck/mc_errors.c +++ b/memcheck/mc_errors.c @@ -1349,7 +1349,7 @@ Bool MC_(read_extra_suppression_info) ( Int fd, HChar** bufpp, if (eof) return True; // old LeakSupp style, no match-leak-kinds line. if (0 == VG_(strncmp)(*bufpp, "match-leak-kinds:", 17)) { i = 17; - while ((*bufpp)[i] && VG_(isspace((*bufpp)[i]))) + while ((*bufpp)[i] && VG_(isspace)((*bufpp)[i])) i++; if (!VG_(parse_enum_set)(MC_(parse_leak_kinds_tokens), True/*allow_all*/, @@ -1394,7 +1394,7 @@ Bool MC_(error_matches_suppression) ( const Error* err, const Supp* su ) { Int su_szB; MC_Error* extra = VG_(get_error_extra)(err); - ErrorKind ekind = VG_(get_error_kind )(err); + ErrorKind ekind = VG_(get_error_kind)(err); switch (VG_(get_supp_kind)(su)) { case ParamSupp: @@ -1522,7 +1522,7 @@ const HChar* MC_(get_error_name) ( const Error* err ) SizeT MC_(get_extra_suppression_info) ( const Error* err, /*OUT*/HChar* buf, Int nBuf ) { - ErrorKind ekind = VG_(get_error_kind )(err); + ErrorKind ekind = VG_(get_error_kind)(err); tl_assert(buf); tl_assert(nBuf >= 1); diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 65fdfcb0dd..964d17fddf 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -6150,7 +6150,7 @@ static Bool VG_(parse_slice) (HChar* s, HChar** saveptr, static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req) { HChar* wcmd; - HChar s[VG_(strlen(req)) + 1]; /* copy for strtok_r */ + HChar s[VG_(strlen)(req) + 1]; /* copy for strtok_r */ HChar *ssaveptr; VG_(strcpy) (s, req);