Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177628616
D58493.1794884523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
754 B
Referenced Files
None
Subscribers
None
D58493.1794884523.diff
View Options
diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c
--- a/usr.bin/mkimg/mkimg.c
+++ b/usr.bin/mkimg/mkimg.c
@@ -248,7 +248,8 @@
parse_part(const char *spec)
{
struct part *part;
- char *sep;
+ const char *sep;
+ char *asep;
size_t len;
int error;
@@ -301,15 +302,14 @@
goto errout;
}
- spec = part->alias;
- sep = strchr(spec, '/');
- if (sep != NULL) {
- *sep++ = '\0';
- if (strlen(part->alias) == 0 || strlen(sep) == 0) {
+ asep = strchr(part->alias, '/');
+ if (asep != NULL) {
+ *asep++ = '\0';
+ if (strlen(part->alias) == 0 || strlen(asep) == 0) {
error = EINVAL;
goto errout;
}
- part->label = strdup(sep);
+ part->label = strdup(asep);
if (part->label == NULL) {
error = ENOMEM;
goto errout;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 17, 3:02 AM (10 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41791924
Default Alt Text
D58493.1794884523.diff (754 B)
Attached To
Mode
D58493: mkimg: Const correctness for C23
Attached
Detach File
Event Timeline