Hi,

> -----Original Message-----
> From: David Laight [mailto:[email protected]]
> > From: Krzysztof Opasiak
> > Replace strings, functions, configs strings placed
> > everywhere in code with macro defintions STRINGS_DIR,
> > FUNCTIONS_DIR and CONFIGS_DIR.
> 
> I'm not convinced this is an improvement, do you have a further
> change in mind?

Yes, I have a lot of changes in my mind, this is only some minor change.
I done it because I don't like writing thousand times that same string
on which correctness of library depends. Let's say that you will make a
spelling mistake and library won't work. Generally it's better to write
the string once in macro, check its correctness and then use compiler to
find you spelling mistakes in macro name.

> It also isn't entirely clear there aren't some other subtle
> changes to the generated strings.

Yes, I didn't mentioned it in commit message but those small changes has
to be done to fix some errors which occurred due to wrong paths
generated by sprintf.


> 
> More important would be to replace all the sprint() calls
> with snprintf() and and (probably) check for truncation before
> using the strings as pathnames.
> 

Yes, you are right. That's one of the next steps, but first I would like
to change the API to be more consistent with libusb. When we will have
final structure definitions I will take care of index out of bounds
control.

-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
[email protected]



 



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to