blob: ff959fa79fa72e9ccf28ec8ad5a33baa6e84beac [file]
/* Public domain, from daemontools-0.76. */
#include "str.h"
int str_diff(const char *s,const char *t)
{
char x;
for (;;) {
x = *s; if (x != *t) break; if (!x) break; ++s; ++t;
x = *s; if (x != *t) break; if (!x) break; ++s; ++t;
x = *s; if (x != *t) break; if (!x) break; ++s; ++t;
x = *s; if (x != *t) break; if (!x) break; ++s; ++t;
}
return ((int)(unsigned int)(unsigned char) x)
- ((int)(unsigned int)(unsigned char) *t);
}