|
svn commit: r13168 - in trunk/subversion: libsvn_delta libsvn_fs_base: msg#00349version-control.subversion.svn
Author: brane Date: Sat Feb 26 05:59:13 2005 New Revision: 13168 Modified: trunk/subversion/libsvn_delta/delta.h trunk/subversion/libsvn_fs_base/reps-strings.c Log: Avoid both compiler warnings and evil casts with a solution based on better understanding of the nature of the universe. * subversion/libsvn_delta/delta.h (svn_txdelta__apply_instructions): Document that the sbuf parameter is not referenced unless the delta window refers to the source data. * subversion/libsvn_fs_base/reps-strings.c (compose_handler, rep_undeltify_range): Pass a NULL source buffer instead of an empty string to svn_txdelta__apply_instructions when the source data isn't referenced. Modified: trunk/subversion/libsvn_delta/delta.h Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_delta/delta.h?view=diff&rev=13168&p1=trunk/subversion/libsvn_delta/delta.h&r1=13167&p2=trunk/subversion/libsvn_delta/delta.h&r2=13168 ============================================================================== --- trunk/subversion/libsvn_delta/delta.h (original) +++ trunk/subversion/libsvn_delta/delta.h Sat Feb 26 05:59:13 2005 @@ -101,8 +101,10 @@ a target view TBUF. SBUF is assumed to have WINDOW->sview_len bytes of data and TBUF is assumed to have room for TLEN bytes of output. TLEN may be more than WINDOW->tview_len, so return the - actual number of bytes written. This is purely a memory operation; - nothing can go wrong as long as we have a valid window. */ + actual number of bytes written. SBUF is not touched and may be + NULL if WINDOW contains no source-copy operations. This is purely a + memory operation; nothing can go wrong as long as we have a valid + window. */ void svn_txdelta__apply_instructions (svn_txdelta_window_t *window, const char *sbuf, char *tbuf, Modified: trunk/subversion/libsvn_fs_base/reps-strings.c Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_fs_base/reps-strings.c?view=diff&rev=13168&p1=trunk/subversion/libsvn_fs_base/reps-strings.c&r1=13167&p2=trunk/subversion/libsvn_fs_base/reps-strings.c&r2=13168 ============================================================================== --- trunk/subversion/libsvn_fs_base/reps-strings.c (original) +++ trunk/subversion/libsvn_fs_base/reps-strings.c Sat Feb 26 05:59:13 2005 @@ -200,7 +200,7 @@ apr_size_t source_len = window->tview_len; assert (cb->window->sview_len == source_len); cb->source_buf = apr_palloc (cb->window_pool, source_len); - svn_txdelta__apply_instructions (window, "", + svn_txdelta__apply_instructions (window, NULL, cb->source_buf, &source_len); cb->done = TRUE; } @@ -364,7 +364,7 @@ } else { - source_buf = (char *) ""; /* Won't read anything from here. */ + source_buf = NULL; /* Won't read anything from here. */ } if (offset > 0) |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r13167 - branches/1.1.x-new-swig/build/ac-macros: 00349, maxb-jqHnx1hy4Dsdnm+yROfE0A |
|---|---|
| Next by Date: | svn commit: r13169 - branches/1.1.x: 00349, maxb-jqHnx1hy4Dsdnm+yROfE0A |
| Previous by Thread: | svn commit: r13167 - branches/1.1.x-new-swig/build/ac-macrosi: 00349, maxb-jqHnx1hy4Dsdnm+yROfE0A |
| Next by Thread: | svn commit: r13169 - branches/1.1.x: 00349, maxb-jqHnx1hy4Dsdnm+yROfE0A |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |