public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "Weiny, Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] opensm: Fix issues causing const warnings for strings
Date: Tue, 12 Mar 2013 10:49:15 -0400	[thread overview]
Message-ID: <513F406B.9040903@dev.mellanox.co.il> (raw)
In-Reply-To: <2807E5FD2F6FDA4886F6618EAC48510EBB2D9E-8k97q/ur5Z1cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On 3/12/2013 10:12 AM, Weiny, Ira wrote:
>> -----Original Message-----
>> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
>> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Hal Rosenstock
>> Sent: Tuesday, March 12, 2013 9:45 AM
>> To: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
>> Subject: [PATCH] opensm: Fix issues causing const warnings for strings
>>
>>
>> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> ---
> 
> [snip]
> 
>>
>> diff --git a/opensm/main.c b/opensm/main.c index 1a061a8..db5429a 100644
>> --- a/opensm/main.c
>> +++ b/opensm/main.c
>> @@ -718,7 +718,7 @@ int main(int argc, char *argv[])
>>  	optind = 0;		/* reset command line */
>>
>>  	if (!config_file)
>> -		config_file = OSM_DEFAULT_CONFIG_FILE;
>> +		config_file = strdup(OSM_DEFAULT_CONFIG_FILE);
>>
> 
> Why is the strdup here but not on the optarg above?
> 
> Also, is this free'ed anywhere?  Can the config file change at run time?  I don't think it can but perhaps you are moving that direction?
> 
> Also, perhaps the strdup should be within osm_subn_parse_conf_file?  

Version 2 patch to follow shortly.

-- Hal

> 
> Ira
> 
> [snip]
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2013-03-12 14:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 13:45 [PATCH] opensm: Fix issues causing const warnings for strings Hal Rosenstock
     [not found] ` <513F3173.4080908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-03-12 14:12   ` Weiny, Ira
     [not found]     ` <2807E5FD2F6FDA4886F6618EAC48510EBB2D9E-8k97q/ur5Z1cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-03-12 14:49       ` Hal Rosenstock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513F406B.9040903@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox