]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix misplaced closing parenthesis in various VG_(....) calls
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 27 Jan 2016 22:35:14 +0000 (22:35 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 27 Jan 2016 22:35:14 +0000 (22:35 +0000)
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

20 files changed:
callgrind/main.c
coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_coredump/coredump-elf.c
coregrind/m_coredump/coredump-solaris.c
coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/readmacho.c
coregrind/m_initimg/initimg-linux.c
coregrind/m_initimg/initimg-solaris.c
coregrind/m_libcbase.c
coregrind/m_main.c
coregrind/m_signals.c
coregrind/m_syswrap/syswrap-solaris.c
coregrind/m_transtab.c
drd/drd_clientreq.c
drd/drd_load_store.c
exp-sgcheck/pc_common.c
helgrind/hg_main.c
massif/ms_main.c
memcheck/mc_errors.c
memcheck/mc_main.c

index 2a9d44ef14f0d52ec4135be7b511abec2ca0de02..b62e835da3d81f3e6bcc2b54eebe5020c5600fe3 100644 (file)
@@ -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) ? " " : ""),
index f6c1a411180b12ddd58b3425cd8c4c80c4d06681..38b7533afd834d300f26e1daa01522203724ba62 100644 (file)
@@ -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) 
index b4e498da72bc2dcce35609b0321cff319eb25462..d51b8d2445cd52bc11740a8b211883a271739cfe 100644 (file)
@@ -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;
index 3a12b78e641d0f071fadd6da6a6f63de0e9ed921..337edc6c488c4b7b3636cbc9d8b23397baf0fe82 100644 (file)
@@ -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;
index 4dc11296601694d441c01deac9076a760dd22216..6b4f0c9d60fe3e2978d6a33dc537503db7e05b1c 100644 (file)
@@ -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;
index 3d406a48246fc4cf24c84333de5b2562501445e0..3f48b2bc8e596dfb76ca70d728ae1ad298904cf9 100644 (file)
@@ -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)(&sect, &sects_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;
index ce876152c2634e3ac81cfd290d8bc4acdac5c365..cb87c7e1c0e9d8f764579a6b065dbcc00bb8190c 100644 (file)
@@ -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) {
index ee4f155c08fd4eb561390a9fbd71ab6d5ec4b9e0..df913da641d93c92d3a1bf9839d09aebac4e8c24 100644 (file)
@@ -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;
          }
index 0d715fa6dc99582214dc1f15d55e419322aeca29..29ede3b48edc7380d9a5ecba4ea00ec52eebe9ce 100644 (file)
@@ -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);
index 9b659ae564b57e20b6cfe4f6c05b3b4326e0e1ae..36489c372176e4b37a5168678908fe5b8c5fc6d8 100644 (file)
@@ -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)("<preamble>\n");
index f029c2ab5edcce5f3036718a427235103473a4c0..3e8326f984399ac90e2128b568c97abefdef60c8 100644 (file)
@@ -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");
 }
index 44282164e5af5f8c1964ee163eed71f6eb20c3ab..384d342a3f2ee6f7f2613f01863af5676451ae9d 100644 (file)
@@ -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. */
index b9cce99201c9ec27aaff5494b2ea213471909309..c1822eeca802d49814d197dc4c28420b72b18e2c 100644 (file)
@@ -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();
index 47405d3aa4afa3e647ac238c085d5d14cbbae5cd..cd8dca4f7c70f2d1f7bef93eb5f5fcf18bf2c51b 100644 (file)
@@ -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));
index f968bcc1dbb5e7b48b148af9a601096d29880b9e..928e3d6c54b9b62d8ed56341ef575f1ef6bba962 100644 (file)
@@ -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)()
index d891d444a52e6b139511956e70df3b28f664c291..827a3db2628fb066b9627631a28d7729e580ff38 100644 (file)
@@ -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);
 
index 9aed05afa259c8989cb787a06371d337472aeafd..3c1f12cafb6806acbd9e29239b3d5487a2ed1c6f 100644 (file)
@@ -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;
 
index 021d79095297cb23cb3fc43aed29701e6eea0f5b..66f9be9cc488ead0f79f37f6483c61492b84740c 100644 (file)
@@ -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);
index 6b763f12412af5dc82d4f6724a25078193ec8c1e..7b5b36a982f2c97592a2492da29fe220acd8420b 100644 (file)
@@ -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);
 
index 65fdfcb0ddad3cec2e164256e3c44efcb615d323..964d17fddf85ece2bfa8a99ab753e485c3877ca8 100644 (file)
@@ -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);