~tritone-team/tritone/eucalyptus

« back to all changes in this revision

Viewing changes to util/data.c

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-12-01 21:09:28 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: james.westby@ubuntu.com-20091201210928-o2dvg0ubljhb0ft6
Tags: upstream-1.6.1~bzr1083
ImportĀ upstreamĀ versionĀ 1.6.1~bzr1083

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
{
190
190
    ncResource * res;
191
191
    
 
192
    if (!nodeStatus) return NULL;
192
193
    if (!(res = malloc(sizeof(ncResource)))) return NULL;
193
 
    if (nodeStatus) {
194
 
      strncpy(res->nodeStatus, nodeStatus, CHAR_BUFFER_SIZE);
195
 
    }
 
194
    strncpy(res->nodeStatus, nodeStatus, CHAR_BUFFER_SIZE);
196
195
    if (publicSubnets) {
197
196
      strncpy(res->publicSubnets, publicSubnets, CHAR_BUFFER_SIZE);
198
197
    }
203
202
    res->numberOfCoresMax = numberOfCoresMax;
204
203
    res->numberOfCoresAvailable = numberOfCoresAvailable;
205
204
    
206
 
    if (!res->nodeStatus ) free_resource(&res);
207
205
    return res;
208
206
}
209
207