> > This is too complicated: > > + strcpy( filename, "event_" ); > snprintf( file_index, sizeof( file_index ), "%ld", i ); > strcat( filename, file_index ); > > In addition, the strcpy() and strcat() functions are dangerous to use. > Why don't you simply use: > > snprintf( filename, sizeof( filename ), "event_%zu", i ); > > ? > > The i is of type size_t, so %ld is not the right format. Firstly, the > signedness is wrong, secondly using "l" is not portable. >
Okay https://github.com/rmeena840/rtems-tools/commit/1ffbe7d5dcea741a3e7ceec8ded869d38c20081f Have a look. What's the procedure for getting code merged? Do I have to raise PR on GitHub or simply send a patch on devel? -- *Ravindra Kumar Meena*, B. Tech. Computer Science and Engineering, Indian Institute of Technology (Indian School of Mines) <https://www.iitism.ac.in/>, Dhanbad
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel