On 7/30/14, 2:55 PM, Arnaldo Carvalho de Melo wrote:
@@ -143,6 +144,14 @@ struct symbol_conf { };extern struct symbol_conf symbol_conf; + +static inline int __symbol__join_symfs(char *bf, size_t size, const char *path) +{ + return path__join(bf, size, symbol_conf.symfs, path); +} + +#define symbol__join_symfs(bf, path) __symbol__join_symfs(bf, sizeof(bf), path) + extern int vmlinux_path__nr_entries; extern char **vmlinux_path;
I am not comfortable with the sizeof(bf) in the macro there. It is to a large degree hiding an important detail and sets up odd failures in the future. ie., It works fine for 'char bf[N];' but not for 'char *bf = "some string";'.
David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

