File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
compiler/cpp/src/thrift/generate Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,13 @@ class t_c_glib_generator : public t_oop_generator {
7676 this ->nspace_lc = " " ;
7777 } else {
7878 /* replace dots with underscores */
79- char * tmp = strdup ( this ->nspace . c_str ()) ;
80- for (unsigned int i = 0 ; i < strlen ( tmp); i++) {
79+ string tmp = this ->nspace ;
80+ for (size_t i = 0 ; i < tmp. size ( ); i++) {
8181 if (tmp[i] == ' .' ) {
8282 tmp[i] = ' _' ;
8383 }
8484 }
85- this ->nspace = string (tmp, strlen (tmp));
86- free (tmp);
85+ this ->nspace = tmp;
8786
8887 /* clean up the namespace for C.
8988 * An input of 'namespace foo' should result in:
Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ class FsyncLog {
6767 FsyncLog () = default ;
6868
6969 void fsync (int fd) {
70- (void )fd;
7170 FsyncCall call;
71+ call.fd = fd;
7272 THRIFT_GETTIMEOFDAY (&call.time , nullptr );
7373 calls_.push_back (call);
7474 }
You can’t perform that action at this time.
0 commit comments