Changeset 24999 for trunk/Nebulous/nebclient/src/nebclient.c
- Timestamp:
- Aug 4, 2009, 2:50:13 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/nebclient/src/nebclient.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/nebclient/src/nebclient.c
r24997 r24999 812 812 } 813 813 814 nullstrncpy(stat->so_id, resultArray[0], 256);815 nullstrncpy(stat->ext_id, resultArray[1], 256);816 nullstrncpy(stat->read_lock, resultArray[2], 256);814 stat->so_id = atol(resultArray[0]); 815 stat->ext_id = atol(resultArray[1]); 816 stat->read_lock = atoi(resultArray[2]); 817 817 nullstrncpy(stat->write_lock, resultArray[3], 256); 818 818 nullstrncpy(stat->epoch, resultArray[4], 256); … … 831 831 } 832 832 833 xfree(stat->so_id); 834 xfree(stat->ext_id); 835 xfree(stat->read_lock); 836 xfree(stat->write_lock); 837 xfree(stat->epoch); 838 xfree(stat->mtime); 839 xfree(stat); 833 nebFree(stat); 840 834 } 841 835 … … 935 929 return -1; 936 930 } 931 932 int available = stat->available; 933 nebObjectStatFree(stat); 934 937 935 // start at one so cull() is called one less time then the # of 938 936 // instances 939 for (long i = 1; i < stat->available; i++) {937 for (long i = 1; i < available; i++) { 940 938 if (!nebCull(server, key)) { 941 nebObjectStatFree(stat);942 939 return -1; 943 940 } 944 941 removed++; 945 942 } 946 nebObjectStatFree(stat);947 943 } 948 944 … … 958 954 959 955 void nebFree(void *ptr) { 956 if (!ptr) { return; } 960 957 xfree(ptr); 961 958 } … … 1197 1194 } 1198 1195 1196 if (!dest) { 1197 dest = xmalloc(n + 1); 1198 } 1199 1199 1200 return strncpy(dest, src, n); 1200 1201 }
Note:
See TracChangeset
for help on using the changeset viewer.
