<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is too complicated:<br>
<br>
+ strcpy( filename, "event_" );<br>
snprintf( file_index, sizeof( file_index ), "%ld", i );<br>
strcat( filename, file_index );<br>
<br>
In addition, the strcpy() and strcat() functions are dangerous to use. <br>
Why don't you simply use:<br>
<br>
snprintf( filename, sizeof( filename ), "event_%zu", i );<br>
<br>
?<br>
<br>
The i is of type size_t, so %ld is not the right format. Firstly, the <br>
signedness is wrong, secondly using "l" is not portable.<br></blockquote><div><br></div><div>Okay</div><div><a href="https://github.com/rmeena840/rtems-tools/commit/1ffbe7d5dcea741a3e7ceec8ded869d38c20081f">https://github.com/rmeena840/rtems-tools/commit/1ffbe7d5dcea741a3e7ceec8ded869d38c20081f</a></div><div><br></div><div>Have a look.</div><div><br></div><div>What's the procedure for getting code merged? Do I have to raise PR on GitHub or simply send a patch on devel? </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="4"><b>Ravindra Kumar Meena</b></font>,<div><span style="color:rgb(102,102,102)">B. Tech. Computer Science and Engineering,<br></span></div><div><span style="color:rgb(102,102,102)"><a href="https://www.iitism.ac.in/" style="color:rgb(17,85,204)" target="_blank">Indian Institute of Technology (Indian School of Mines)</a>, Dhanbad</span></div></div></div></div></div></div>