Changeset 30 for trunk/samba/source/param/loadparm.c
- Timestamp:
- Apr 25, 2007, 11:44:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/param/loadparm.c
r22 r30 2238 2238 } 2239 2239 2240 return atoi(s);2240 return (int)strtol(s, NULL, 0); 2241 2241 } 2242 2242 … … 2252 2252 } 2253 2253 2254 return strtoul(s, NULL, 10);2254 return strtoul(s, NULL, 0); 2255 2255 } 2256 2256 … … 5302 5302 ********************************************************************/ 5303 5303 5304 char *volume_label(int snum) 5305 { 5306 char *ret = lp_volume(snum); 5307 if (!*ret) 5308 return lp_servicename(snum); 5309 return (ret); 5310 } 5311 5304 const char *volume_label(int snum) 5305 { 5306 char *ret; 5307 const char *label = lp_volume(snum); 5308 if (!*label) { 5309 label = lp_servicename(snum); 5310 } 5311 5312 /* This returns a 33 byte guarenteed null terminated string. */ 5313 ret = talloc_strndup(main_loop_talloc_get(), label, 32); 5314 if (!ret) { 5315 return ""; 5316 } 5317 return ret; 5318 } 5312 5319 5313 5320 /*******************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.